Skip to content

Commit

Permalink
#576 empty lines check added
Browse files Browse the repository at this point in the history
  • Loading branch information
krzyk committed Aug 10, 2018
1 parent be80eb7 commit 712d2a1
Showing 6 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -375,6 +375,11 @@
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
<module name="EmptyLineSeparator">
<property name="allowMultipleEmptyLines" value="false"/>
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
<property name="tokens" value="IMPORT,CLASS_DEF,INTERFACE_DEF,ENUM_DEF,STATIC_INIT,INSTANCE_INIT,METHOD_DEF,CTOR_DEF,VARIABLE_DEF"/>
</module>

<!--
Our custom checkers.
Original file line number Diff line number Diff line change
@@ -529,13 +529,13 @@ public void distinguishesValidCatchParameterNames() throws Exception {
results,
Matchers.hasItems(
new ViolationMatcher(
"Name 'ex_invalid_1' must match pattern", file, "25", name
"Name 'ex_invalid_1' must match pattern", file, "26", name
),
new ViolationMatcher(
"Name '$xxx' must match pattern", file, "27", name
"Name '$xxx' must match pattern", file, "28", name
),
new ViolationMatcher(
"Name '_exp' must match pattern", file, "29", name
"Name '_exp' must match pattern", file, "30", name
)
)
);
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ public final class CatchParameterNames {
* Dummy variable.
*/
private int var;

/**
* Invalid exception parameter name.
*/
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ private void start() {
Collections.singletonList("1")
.forEach(this::doSomething);
}

/**
* Method to be referenced.
* @param value Value to print
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ public final class LocalVariableNames {
* Just a field.
*/
private transient int field;

/**
* Just an id.
*/
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ public final class ValidSemicolon {
* Dummy data.
*/
private int dat = 1;

/**
* Method without extra semicolon in the end
* of try-with-resources head.

0 comments on commit 712d2a1

Please sign in to comment.