EmptyLineSeparator: disable

This commit is contained in:
Paul Campbell 2018-04-19 20:58:44 +01:00
parent 67952af227
commit ea2c909a32
8 changed files with 11 additions and 60 deletions

View file

@ -1,6 +1,11 @@
CHANGELOG CHANGELOG
========= =========
4.2.0
-----
* EmptyLineSeparator: disabled
4.1.0 4.1.0
----- -----

View file

@ -101,7 +101,7 @@ Rule|Level|Source|Enabled|Suppressible
[EmptyCatchBlock](#emptycatchblock)|tweaks|checkstyle|Yes| [EmptyCatchBlock](#emptycatchblock)|tweaks|checkstyle|Yes|
[EmptyForInitializerPad](#emptyforinitializerpad)|layout|checkstyle|Yes| [EmptyForInitializerPad](#emptyforinitializerpad)|layout|checkstyle|Yes|
[EmptyForIteratorPad](#emptyforiteratorpad)|layout|checkstyle|Yes| [EmptyForIteratorPad](#emptyforiteratorpad)|layout|checkstyle|Yes|
[EmptyLineSeparator](#emptylineseparator)|layout|checkstyle|Yes| [EmptyLineSeparator](#emptylineseparator)|layout|checkstyle||
[EmptyPublicCtorInClass](#emptypublicctorinclass)|tweaks|sevntu|Yes| [EmptyPublicCtorInClass](#emptypublicctorinclass)|tweaks|sevntu|Yes|
[EmptyStatement](#emptystatement)|layout|checkstyle|Yes| [EmptyStatement](#emptystatement)|layout|checkstyle|Yes|
[EnumValueName](#enumvaluename)|naming|sevntu|Yes| [EnumValueName](#enumvaluename)|naming|sevntu|Yes|
@ -768,59 +768,6 @@ Invalid:
```` ````
for (Iterator i = list.getIterator(); i.hasNext() ; ) {} for (Iterator i = list.getIterator(); i.hasNext() ; ) {}
```` ````
#### [EmptyLineSeparator](http://checkstyle.sourceforge.net/config_whitespace.html#EmptyLineSeparator)
Checks that there are blank lines between header, package, import blocks, field, constructors, methods, nested classes, static initialisers and instance initialisers.
Valid:
````
/**
* Licence header.
*/
package net.kemitix.foo;
import ...;
import ...;
class Foo {
private int a;
private int b;
Foo() {}
Foo(int a, int b) {}
int getA() {}
int getB() {}
class Bar {
}
}
````
Invalid:
````
/**
* Licence header.
*/
package net.kemitix.foo;
import ...;
import ...;
class Foo {
private int a;
private int b;
Foo() {}
Foo(int a, int b) {}
int getA() {}
int getB() {}
class Bar {
}
}
````
#### [EmptyStatement](http://checkstyle.sourceforge.net/config_coding.html#EmptyStatement) #### [EmptyStatement](http://checkstyle.sourceforge.net/config_coding.html#EmptyStatement)
Checks for empty statements. An empty statement is a standalone semicolon (;). Checks for empty statements. An empty statement is a standalone semicolon (;).
@ -2643,6 +2590,9 @@ Ref: Clean Code, Robert C. Martin, J1: Avoid Long Import Lists by Using Wildcard
Ref: Clean Code, Robert C. Martin, J2: Don't Inherit Constants Ref: Clean Code, Robert C. Martin, J2: Don't Inherit Constants
Recommends using a static import to access constants from another class over inheriting them. Recommends using a static import to access constants from another class over inheriting them.
#### [EmptyLineSeparator](http://checkstyle.sourceforge.net/config_whitespace.html#EmptyLineSeparator)
#### [FinalLocalVariable](http://checkstyle.sourceforge.net/config_coding.html#FinalLocalVariable) #### [FinalLocalVariable](http://checkstyle.sourceforge.net/config_coding.html#FinalLocalVariable)
Doesn't recognise Lombok's `val` as being `final`. Doesn't recognise Lombok's `val` as being `final`.

View file

@ -241,9 +241,10 @@ rules:
name: EmptyLineSeparator name: EmptyLineSeparator
parent: TREEWALKER parent: TREEWALKER
level: LAYOUT level: LAYOUT
enabled: true enabled: false
source: CHECKSTYLE source: CHECKSTYLE
uri: http://checkstyle.sourceforge.net/config_whitespace.html#EmptyLineSeparator uri: http://checkstyle.sourceforge.net/config_whitespace.html#EmptyLineSeparator
reason:
- -
name: EmptyStatement name: EmptyStatement
parent: TREEWALKER parent: TREEWALKER

View file

@ -26,7 +26,6 @@
<module name="com.puppycrawl.tools.checkstyle.checks.coding.DeclarationOrderCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.DeclarationOrderCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.GenericWhitespaceCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.GenericWhitespaceCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck"/>

View file

@ -32,7 +32,6 @@
<module name="com.puppycrawl.tools.checkstyle.checks.coding.DeclarationOrderCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.DeclarationOrderCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.GenericWhitespaceCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.GenericWhitespaceCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.naming.InterfaceTypeParameterNameCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.naming.InterfaceTypeParameterNameCheck"/>

View file

@ -38,7 +38,6 @@
<module name="com.puppycrawl.tools.checkstyle.checks.coding.DeclarationOrderCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.DeclarationOrderCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.FallThroughCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.FallThroughCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.GenericWhitespaceCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.GenericWhitespaceCheck"/>

View file

@ -46,7 +46,6 @@
</module> </module>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.ExplicitInitializationCheck"> <module name="com.puppycrawl.tools.checkstyle.checks.coding.ExplicitInitializationCheck">

View file

@ -62,7 +62,6 @@
</module> </module>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForIteratorPadCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.EmptyStatementCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck"/>
<module name="com.puppycrawl.tools.checkstyle.checks.coding.EqualsHashCodeCheck"/> <module name="com.puppycrawl.tools.checkstyle.checks.coding.EqualsHashCodeCheck"/>