Skip to content

Commit 712d2a1

Browse files
committedAug 10, 2018
#576 empty lines check added
1 parent be80eb7 commit 712d2a1

File tree

6 files changed

+12
-3
lines changed

6 files changed

+12
-3
lines changed
 

‎qulice-checkstyle/src/main/resources/com/qulice/checkstyle/checks.xml

+5
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,11 @@
375375
<module name="TypecastParenPad"/>
376376
<module name="WhitespaceAfter"/>
377377
<module name="WhitespaceAround"/>
378+
<module name="EmptyLineSeparator">
379+
<property name="allowMultipleEmptyLines" value="false"/>
380+
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
381+
<property name="tokens" value="IMPORT,CLASS_DEF,INTERFACE_DEF,ENUM_DEF,STATIC_INIT,INSTANCE_INIT,METHOD_DEF,CTOR_DEF,VARIABLE_DEF"/>
382+
</module>
378383

379384
<!--
380385
Our custom checkers.

‎qulice-checkstyle/src/test/java/com/qulice/checkstyle/CheckstyleValidatorTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -529,13 +529,13 @@ public void distinguishesValidCatchParameterNames() throws Exception {
529529
results,
530530
Matchers.hasItems(
531531
new ViolationMatcher(
532-
"Name 'ex_invalid_1' must match pattern", file, "25", name
532+
"Name 'ex_invalid_1' must match pattern", file, "26", name
533533
),
534534
new ViolationMatcher(
535-
"Name '$xxx' must match pattern", file, "27", name
535+
"Name '$xxx' must match pattern", file, "28", name
536536
),
537537
new ViolationMatcher(
538-
"Name '_exp' must match pattern", file, "29", name
538+
"Name '_exp' must match pattern", file, "30", name
539539
)
540540
)
541541
);

‎qulice-checkstyle/src/test/resources/com/qulice/checkstyle/CatchParameterNames.java

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public final class CatchParameterNames {
1616
* Dummy variable.
1717
*/
1818
private int var;
19+
1920
/**
2021
* Invalid exception parameter name.
2122
*/

‎qulice-checkstyle/src/test/resources/com/qulice/checkstyle/InstanceMethodRef.java

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ private void start() {
1414
Collections.singletonList("1")
1515
.forEach(this::doSomething);
1616
}
17+
1718
/**
1819
* Method to be referenced.
1920
* @param value Value to print

‎qulice-checkstyle/src/test/resources/com/qulice/checkstyle/LocalVariableNames.java

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public final class LocalVariableNames {
1313
* Just a field.
1414
*/
1515
private transient int field;
16+
1617
/**
1718
* Just an id.
1819
*/

‎qulice-checkstyle/src/test/resources/com/qulice/checkstyle/ValidSemicolon.java

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public final class ValidSemicolon {
1212
* Dummy data.
1313
*/
1414
private int dat = 1;
15+
1516
/**
1617
* Method without extra semicolon in the end
1718
* of try-with-resources head.

0 commit comments

Comments
 (0)
Please sign in to comment.