-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: formatter no longer adds whitespace to blank lines (#800)
Don't add whitespace to blank lines inside comments. Fixes #799
- Loading branch information
1 parent
ee8012d
commit 316aef3
Showing
5 changed files
with
67 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: fix | ||
fix: | ||
description: 'Don''t add whitespace to blank lines inside comments. Fixes #799' | ||
links: | ||
- https://github.com/palantir/gradle-baseline/pull/800 |
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
19 changes: 19 additions & 0 deletions
19
...baseline-java/src/test/resources/com/palantir/baseline/blank-lines-in-comments-fixed.java
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; | ||
|
||
public class Test { | ||
/** | ||
Docstring that looks like a list: | ||
1. hey | ||
2. there | ||
with blank line. | ||
*/ | ||
Void test() { | ||
/* | ||
Normal comment | ||
with blank line. | ||
*/ | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
gradle-baseline-java/src/test/resources/com/palantir/baseline/blank-lines-in-comments.java
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; | ||
|
||
public class Test { | ||
/** | ||
Docstring that looks like a list: | ||
1. hey | ||
2. there | ||
with blank line. | ||
*/ | ||
Void test() { | ||
/* | ||
Normal comment | ||
with blank line. | ||
*/ | ||
} | ||
} |