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

Changing the default line length limit to 120 #1010

Merged
merged 2 commits into from
Dec 22, 2016
Merged

Changing the default line length limit to 120 #1010

merged 2 commits into from
Dec 22, 2016

Conversation

marcelofabri
Copy link
Collaborator

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.

@@ -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
Copy link
Collaborator Author

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).

Copy link
Collaborator

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?

Copy link
Collaborator Author

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?

Copy link
Collaborator

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.

@codecov-io
Copy link

Current coverage is 82.34% (diff: 80.95%)

No coverage report found for master at 31cd4cf.

Powered by Codecov. Last update 31cd4cf...5cccc12

@@ -2,7 +2,9 @@

##### Breaking

* None.
* `file_length` rule now has a default value of `120` for warnings.
Copy link
Collaborator

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...

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