Skip to content

Change swift-format configuration to 120 columns #2544

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 1 commit into from
Mar 21, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 15, 2024

This makes the format the same as the one in sourcekit-lsp, converging towards a single format style.

rdar://123241356

@ahoppen
Copy link
Member Author

ahoppen commented Mar 15, 2024

@swift-ci Please test

@ahoppen ahoppen force-pushed the ahoppen/120-columns branch from bdd337d to 0fda60d Compare March 16, 2024 03:56
@ahoppen
Copy link
Member Author

ahoppen commented Mar 16, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 17, 2024

@swift-ci Please test Windows

@@ -357,7 +365,8 @@ public let ATTRIBUTE_NODES: [Node] = [
kind: .differentiabilityArgument,
base: .syntax,
nameForDiagnostics: "differentiability argument",
documentation: "A differentiability argument: either the \"self\" identifier, a function parameter name, or a function parameter index.",
documentation:
"A differentiability argument: either the \"self\" identifier, a function parameter name, or a function parameter index.",
Copy link
Contributor

@bnbarham bnbarham Mar 19, 2024

Choose a reason for hiding this comment

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

I'm fine with this change in general (I think 120 is a nice compromise between 80 and massive lines), though it really seems like we need to teach swift-format to split both strings and comments - the split here doesn't really make sense.

Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't agree more. It would be amazing if swift-format could split it in a better way 🥺

@ahoppen ahoppen force-pushed the ahoppen/120-columns branch from 0fda60d to 510ca34 Compare March 20, 2024 10:34
@ahoppen
Copy link
Member Author

ahoppen commented Mar 20, 2024

@swift-ci Please test

@ahoppen ahoppen enabled auto-merge March 20, 2024 10:34
@ahoppen
Copy link
Member Author

ahoppen commented Mar 20, 2024

@swift-ci Please test Windows

This makes the format the same as the one in sourcekit-lsp, converging towards a single format style.

rdar://123241356
@ahoppen ahoppen force-pushed the ahoppen/120-columns branch from 510ca34 to 4fae6c4 Compare March 20, 2024 14:02
@ahoppen
Copy link
Member Author

ahoppen commented Mar 20, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 20, 2024

@swift-ci Please test Windows

@ahoppen ahoppen disabled auto-merge March 20, 2024 21:43
@ahoppen ahoppen merged commit 9e8449d into swiftlang:main Mar 21, 2024
@ahoppen ahoppen deleted the ahoppen/120-columns branch March 21, 2024 07:36
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