Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure expression folding by argument of @SwiftSyntaxRule macro #5255

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

SimplyDanny
Copy link
Collaborator

No description provided.


func preprocess(file: SwiftLintFile) -> SourceFileSyntax? {
file.foldedSyntaxTree
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might be able to find a solution for this explicit implementation as well. Configurations need to be passed to the visitor somehow automatically.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's done with #5275.

@SwiftLintBot
Copy link

SwiftLintBot commented Oct 3, 2023

1 Warning
⚠️ If this is a user-facing change, please include a CHANGELOG entry to credit yourself!
You can find it at CHANGELOG.md.
17 Messages
📖 Linting Aerial with this PR took 1.2s vs 1.21s on main (0% faster)
📖 Linting Alamofire with this PR took 1.57s vs 1.59s on main (1% faster)
📖 Linting Brave with this PR took 8.88s vs 8.92s on main (0% faster)
📖 Linting DuckDuckGo with this PR took 4.48s vs 4.49s on main (0% faster)
📖 Linting Firefox with this PR took 10.46s vs 10.51s on main (0% faster)
📖 Linting Kickstarter with this PR took 11.54s vs 11.57s on main (0% faster)
📖 Linting Moya with this PR took 0.63s vs 0.64s on main (1% faster)
📖 Linting NetNewsWire with this PR took 3.34s vs 3.35s on main (0% faster)
📖 Linting Nimble with this PR took 0.84s vs 0.84s on main (0% slower)
📖 Linting PocketCasts with this PR took 8.8s vs 8.85s on main (0% faster)
📖 Linting Quick with this PR took 0.41s vs 0.41s on main (0% slower)
📖 Linting Realm with this PR took 11.56s vs 11.5s on main (0% slower)
📖 Linting Sourcery with this PR took 2.84s vs 2.84s on main (0% slower)
📖 Linting Swift with this PR took 5.3s vs 5.33s on main (0% faster)
📖 Linting VLC with this PR took 1.55s vs 1.56s on main (0% faster)
📖 Linting Wire with this PR took 19.76s vs 19.74s on main (0% slower)
📖 Linting WordPress with this PR took 13.3s vs 13.36s on main (0% faster)

Here's an example of your CHANGELOG entry:

* Configure expression folding by argument of @SwiftSyntaxRule macro.  
  [SimplyDanny](https://github.com/SimplyDanny)
  [#issue_number](https://github.com/realm/SwiftLint/issues/issue_number)

note: There are two invisible spaces after the entry's text.

Generated by 🚫 Danger

Copy link
Collaborator

@jpsim jpsim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nicer, thanks!

@SimplyDanny SimplyDanny enabled auto-merge (squash) October 3, 2023 11:08
@SimplyDanny SimplyDanny merged commit f6e5f77 into realm:main Oct 3, 2023
4 checks passed
@SimplyDanny SimplyDanny deleted the fold-argument branch October 3, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants