-
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
Bugfix. Newline at the beginning of code block is not removed if there are more than one #537
Conversation
### What's done: * Fixed bugs
Codecov Report
@@ Coverage Diff @@
## master #537 +/- ##
=========================================
Coverage 81.68% 81.69%
- Complexity 1641 1665 +24
=========================================
Files 79 83 +4
Lines 4139 4211 +72
Branches 1307 1314 +7
=========================================
+ 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.
|
### What's done: * Fixed bugs
This reverts commit fdece79.
@@ -53,7 +56,10 @@ class BlankLinesRule(private val configRules: List<RulesConfig>) : Rule("blank-l | |||
|
|||
private fun handleTooManyBlankLines(node: ASTNode) { | |||
TOO_MANY_BLANK_LINES.warnAndFix(configRules, emitWarn, isFixMode, "do not use more than two consecutive blank lines", node.startOffset, node) { | |||
node.leaveExactlyNumNewLines(2) | |||
if (node.treeParent.findAllNodesWithSpecificType(WHITE_SPACE).first() == node) |
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.
Isn't findChildByType
enough here?
### What's done: * Fixed bugs
What's done:
This pull request closes #519