-
Notifications
You must be signed in to change notification settings - Fork 39
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
WhiteSpaceRule after NewlinesRule #549
Conversation
### What's done: Changed rules
### What's done: Fixed bug and added tests
Codecov Report
@@ Coverage Diff @@
## master #549 +/- ##
=========================================
Coverage 81.68% 81.69%
- Complexity 1641 1665 +24
=========================================
Files 79 83 +4
Lines 4139 4211 +72
Branches 1307 1315 +8
=========================================
+ Hits 3381 3440 +59
- Misses 229 238 +9
- Partials 529 533 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
lgtm
@@ -297,7 +297,7 @@ class NewlinesRule(private val configRules: List<RulesConfig>) : Rule("newlines" | |||
val colon = funNode.findChildByType(COLON)!! | |||
val expression = node.findChildByType(RETURN_KEYWORD)!!.nextCodeSibling()!! | |||
funNode.apply { | |||
removeRange(colon, null) | |||
removeRange(if (colon.treePrev.elementType == WHITE_SPACE) colon.treePrev else colon, null) |
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.
that was too easy! :)
What's done:
Changed rules
closes #484