-
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
[Abandoned] Adds closure_body_length opt-in rule #1747
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1747 +/- ##
==========================================
+ Coverage 88.26% 88.34% +0.07%
==========================================
Files 227 229 +2
Lines 11218 11291 +73
==========================================
+ Hits 9902 9975 +73
Misses 1316 1316
Continue to review full report at Codecov.
|
c4dd40f
to
4906ecd
Compare
I'm having problems to find the exact number of lines. The Update 1: Issue created to discuss the problem with the valid number of code (#1750) |
d1626c8
to
5b160c3
Compare
let reason = "Closure body should span \(configuration.warning) lines or less " + | ||
"excluding comments and whitespace: currently spans \(lineCount) " + "lines" | ||
let closuresAsArgument = dictionary.substructure | ||
.filter { $0.kind == SwiftExpressionKind.argument.rawValue } |
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.
Use dictionary.enclosedArguments instead.
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.
Done.
I'll keep this PR blocked for now because it depends on #1753. Once that one is merged, this one needs to be rebased and have the tests updated to match the correct number of lines. |
c582bf2
to
d68cb1b
Compare
because closure bodies should not span too many lines. Implements realm#52.
It's easier to read than a long tuple.
Depends on #1750. |
because closure bodies should not span too many lines. Implements #52.