EmptyLineSeparator: disable
This commit is contained in:
parent
67952af227
commit
ea2c909a32
8 changed files with 11 additions and 60 deletions
|
@ -1,6 +1,11 @@
|
|||
CHANGELOG
|
||||
=========
|
||||
|
||||
4.2.0
|
||||
-----
|
||||
|
||||
* EmptyLineSeparator: disabled
|
||||
|
||||
4.1.0
|
||||
-----
|
||||
|
||||
|
|
58
README.md
58
README.md
|
@ -101,7 +101,7 @@ Rule|Level|Source|Enabled|Suppressible
|
|||
[EmptyCatchBlock](#emptycatchblock)|tweaks|checkstyle|Yes|
|
||||
[EmptyForInitializerPad](#emptyforinitializerpad)|layout|checkstyle|Yes|
|
||||
[EmptyForIteratorPad](#emptyforiteratorpad)|layout|checkstyle|Yes|
|
||||
[EmptyLineSeparator](#emptylineseparator)|layout|checkstyle|Yes|
|
||||
[EmptyLineSeparator](#emptylineseparator)|layout|checkstyle||
|
||||
[EmptyPublicCtorInClass](#emptypublicctorinclass)|tweaks|sevntu|Yes|
|
||||
[EmptyStatement](#emptystatement)|layout|checkstyle|Yes|
|
||||
[EnumValueName](#enumvaluename)|naming|sevntu|Yes|
|
||||
|
@ -768,59 +768,6 @@ Invalid:
|
|||
````
|
||||
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)
|
||||
|
||||
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
|
||||
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)
|
||||
|
||||
Doesn't recognise Lombok's `val` as being `final`.
|
||||
|
|
|
@ -241,9 +241,10 @@ rules:
|
|||
name: EmptyLineSeparator
|
||||
parent: TREEWALKER
|
||||
level: LAYOUT
|
||||
enabled: true
|
||||
enabled: false
|
||||
source: CHECKSTYLE
|
||||
uri: http://checkstyle.sourceforge.net/config_whitespace.html#EmptyLineSeparator
|
||||
reason:
|
||||
-
|
||||
name: EmptyStatement
|
||||
parent: TREEWALKER
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
<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.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.whitespace.GenericWhitespaceCheck"/>
|
||||
<module name="com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck"/>
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
<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.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.whitespace.GenericWhitespaceCheck"/>
|
||||
<module name="com.puppycrawl.tools.checkstyle.checks.naming.InterfaceTypeParameterNameCheck"/>
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
<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.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.FallThroughCheck"/>
|
||||
<module name="com.puppycrawl.tools.checkstyle.checks.whitespace.GenericWhitespaceCheck"/>
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
</module>
|
||||
<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.EmptyLineSeparatorCheck"/>
|
||||
<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.ExplicitInitializationCheck">
|
||||
|
|
|
@ -62,7 +62,6 @@
|
|||
</module>
|
||||
<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.EmptyLineSeparatorCheck"/>
|
||||
<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.EqualsHashCodeCheck"/>
|
||||
|
|
Loading…
Reference in a new issue