-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Changing the default line length limit to 120 #1010
Changing the default line length limit to 120 #1010
Conversation
@@ -25,3 +25,4 @@ file_header: | |||
\/\/ Created by .*? on \d{1,2}\/\d{1,2}\/\d{2}\. | |||
\/\/ Copyright © \d{4} Realm\. All rights reserved\. | |||
\/\/ | |||
line_length: 120 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added this here to prevent the swiftlint
build phase to generate warnings (since it's using the installed version, which probably is the latest stable one).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could log a message if a configuration has line length explicitly set to 120, so that more people will be aware that this is SwiftLint's new default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel it'd be very useful as some people may see to not relying on the defaults as a good practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, maybe. I'm a bit torn, so happy to go with your preference on this one.
Current coverage is 82.34% (diff: 80.95%)
|
@@ -2,7 +2,9 @@ | |||
|
|||
##### Breaking | |||
|
|||
* None. | |||
* `file_length` rule now has a default value of `120` for warnings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though not really a breaking change, I do approve of having it in this section to spread the word...
Fixes #1008.
I particularly don't like breaking lines on
(
or->
in function declarations, so I've changed the ones I've found now that we have a larger line length limit.