Skip to content

Apply exhaustive swift-format configuration from swift-syntax #2231

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

Merged
merged 2 commits into from
Aug 11, 2025

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Aug 11, 2025

Apply the exhaustive swift-format configuration from swiftlang/swift-syntax#3117 to sourcekit-lsp. Also apply all automatic formattings.

From the linter rules that needed manual fixing (addressed those in a separate commit), I have two findings, would like to hear other opinions here as well:

  • I think there are valid calls with mixing inline and trailing closures (notably Debouncer), so I’m considering whether we should disable that rule.
  • The forEach rule is a little annoying because we have forEach on SKDResponseArray. But it caught two cases of using forEach on arrays, so I think it’s worth keeping.

Apply the exhaustive swift-format configuration from swiftlang/swift-syntax#3117 to sourcekit-lsp. Also apply all automatic formattings.
- I think there are valid calls with mixing inline and trailing closures (notably `Debouncer`), so I’m considering whether we should disable that rule.
- The `forEach` rule is a little annoying because we have `forEach` on `SKDResponseArray`. But it caught two cases of using `forEach` on arrays, so I think it’s worth keeping.
@ahoppen
Copy link
Member Author

ahoppen commented Aug 11, 2025

@swift-ci Please test

Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

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

I think there are valid calls with mixing inline and trailing closures (notably Debouncer), so I’m considering whether we should disable that rule.

Either seems fine to me

The forEach rule is a little annoying because we have forEach on SKDResponseArray. But it caught two cases of using forEach on arrays, so I think it’s worth keeping.

Yeah, maybe we should rename the SKD case? forEachSKD :)?

@ahoppen ahoppen merged commit d887490 into swiftlang:main Aug 11, 2025
3 checks passed
@ahoppen ahoppen deleted the exhaustive-swift-format branch August 11, 2025 19:02
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.

2 participants