-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#656 Prohibit empty line at the start and at the end of javadoc: fix …
…code review remarks part2
- Loading branch information
Showing
4 changed files
with
186 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
/** | ||
* | ||
* This is not a real Java class. It won't be compiled ever. It is used | ||
* only as a text resource in integration.ChecksIT. | ||
*/ | ||
public final class Invalid { | ||
|
||
/** | ||
* | ||
* Empty javadoc line at the beginning. | ||
*/ | ||
private static final int x = 0; | ||
|
||
/** | ||
* | ||
* Empty javadoc line at the beginning. | ||
*/ | ||
private int y = 0; | ||
|
||
/** | ||
* Empty javadoc line at the end. | ||
* | ||
*/ | ||
private int z = 0; | ||
|
||
/** | ||
* | ||
* Empty javadoc line at the beginning. | ||
*/ | ||
public Invalid() {} | ||
|
||
/** | ||
* | ||
* Empty javadoc line | ||
* @param param - param. | ||
* @return Param. | ||
* | ||
*/ | ||
public String method(final String param) { | ||
return param; | ||
} | ||
|
||
/** | ||
* | ||
* Empty javadoc line at the beginning. | ||
*/ | ||
public void method2() { | ||
} | ||
|
||
/** | ||
* | ||
* Empty javadoc line at the beginning. | ||
*/ | ||
|
||
public void method3() { | ||
} | ||
|
||
private static class InnerInvalid { | ||
|
||
/** | ||
* Empty javadoc line at the end. | ||
* | ||
*/ | ||
private final int x; | ||
|
||
/** | ||
* | ||
* Empty javadoc line at the beginning. | ||
* @param x - x | ||
*/ | ||
public InnerInvalid(int x) { | ||
this.x = x; | ||
} | ||
|
||
/** | ||
* | ||
* Empty javadoc line at the beginning. | ||
*/ | ||
public void method() { | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* This is not a real interface class. It won't be compiled ever. It is used | ||
* only as a text resource in integration.ChecksIT. | ||
* | ||
*/ | ||
interface I1 { | ||
|
||
/** | ||
* | ||
* Empty javadoc line at the beginning | ||
*/ | ||
void method(); | ||
|
||
/** | ||
* | ||
* Integer variable. | ||
*/ | ||
int x = 0; | ||
|
||
} | ||
|
||
/** | ||
* | ||
* Empty javadoc line. | ||
* | ||
*/ | ||
enum InvalidEnum{ | ||
|
||
/** | ||
* | ||
* Empty javadoc line at the beginning. | ||
*/ | ||
INVALID_ENUM("someValue"); | ||
|
||
/** | ||
* Empty javadoc line at the end. | ||
* | ||
*/ | ||
private final String name; | ||
|
||
|
||
/** | ||
* Empty javadoc line at the end. | ||
* | ||
*/ | ||
InvalidEnum(final String name) { | ||
this.name = name; | ||
} | ||
} | ||
|
||
|
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
25 changes: 18 additions & 7 deletions
25
.../src/test/resources/com/qulice/checkstyle/ChecksTest/JavadocEmptyLineCheck/violations.txt
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 |
---|---|---|
@@ -1,9 +1,20 @@ | ||
2:Empty javadoc line at the beginning | ||
12:Empty javadoc line at the beginning | ||
19:Empty javadoc line at the end | ||
24:Empty javadoc line at the beginning | ||
31:Empty javadoc line at the end | ||
37:Empty javadoc line at the beginning | ||
9:Empty javadoc line at the beginning | ||
15:Empty javadoc line at the beginning | ||
22:Empty javadoc line at the end | ||
27:Empty javadoc line at the beginning | ||
33:Empty javadoc line at the beginning | ||
37:Empty javadoc line at the end | ||
44:Empty javadoc line at the beginning | ||
56:Empty javadoc line at the end | ||
63:Empty javadoc line at the beginning | ||
51:Empty javadoc line at the beginning | ||
62:Empty javadoc line at the end | ||
67:Empty javadoc line at the beginning | ||
76:Empty javadoc line at the beginning | ||
87:Empty javadoc line at the end | ||
92:Empty javadoc line at the beginning | ||
98:Empty javadoc line at the beginning | ||
106:Empty javadoc line at the beginning | ||
108:Empty javadoc line at the end | ||
113:Empty javadoc line at the beginning | ||
120:Empty javadoc line at the end | ||
127:Empty javadoc line at the end |