-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bugfix for blank lines rule ### What's done: * added a check if there are blank lines at the end of a block. * added tests (#1054)
- Loading branch information
1 parent
c1d823a
commit 9493df5
Showing
5 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
.../test/resources/test/paragraph3/blank_lines/RedundantBlankLinesAtTheEndOfBlockExpected.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package test.paragraph3.blank_lines | ||
|
||
class Example { | ||
fun foo() { | ||
bar() | ||
} | ||
|
||
fun bar() { | ||
println() | ||
println() | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
.../src/test/resources/test/paragraph3/blank_lines/RedundantBlankLinesAtTheEndOfBlockTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package test.paragraph3.blank_lines | ||
|
||
class Example { | ||
fun foo() { | ||
bar() | ||
|
||
|
||
} | ||
|
||
fun bar() { | ||
println() | ||
println() | ||
|
||
|
||
|
||
} | ||
|
||
|
||
} |
9493df5
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 wasn't able to retrieve PDD puzzles from the code base and submit them to GitHub. If you think that it's a bug on our side, please submit it to yegor256/0pdd:
Please, copy and paste this stack trace to GitHub: