Merge pull request #82 from kemitix/relax-fields

Relax fields
This commit is contained in:
Paul Campbell 2018-05-10 17:15:00 +01:00 committed by GitHub
commit b0fafdab44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 26 additions and 72 deletions

View file

@ -1,6 +1,14 @@
CHANGELOG
=========
4.2.0
-----
* EmptyLineSeparator: disabled
* Upgrade `tiles-maven-plugin` to 2.11
* Upgrade `checkstyle` to 8.10
* Upgrade `sevntu-checkstyle` to 1.29.0
4.1.0
-----

View file

@ -20,7 +20,7 @@ The simplest way to use the ruleset is with the maven-tile:
```xml
<project>
<properties>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
<tiles-maven-plugin.version>2.11</tiles-maven-plugin.version>
</properties>
<build>
<plugins>
@ -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`.

View file

@ -19,11 +19,11 @@
<properties>
<maven.install.skip>true</maven.install.skip>
<java.version>1.8</java.version>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
<tiles-maven-plugin.version>2.11</tiles-maven-plugin.version>
<kemitix-tiles.version>0.8.1</kemitix-tiles.version>
<checkstyle.version>8.7</checkstyle.version>
<sevntu.version>1.27.0</sevntu.version>
<checkstyle.version>8.10</checkstyle.version>
<sevntu.version>1.29.0</sevntu.version>
<lombok.version>1.16.20</lombok.version>
<spring-platform.version>Brussels-SR6</spring-platform.version>
<spring-boot.version>1.5.9.RELEASE</spring-boot.version>

View file

@ -20,7 +20,7 @@ The simplest way to use the ruleset is with the maven-tile:
```xml
<project>
<properties>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
<tiles-maven-plugin.version>2.11</tiles-maven-plugin.version>
</properties>
<build>
<plugins>

View file

@ -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

View file

@ -16,12 +16,12 @@
<properties>
<maven.install.skip>true</maven.install.skip>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
<tiles-maven-plugin.version>2.11</tiles-maven-plugin.version>
<kemitix-tiles.version>0.8.1</kemitix-tiles.version>
<java.version>1.8</java.version>
<checkstyle.version>8.7</checkstyle.version>
<sevntu.version>1.27.0</sevntu.version>
<checkstyle.version>8.10</checkstyle.version>
<sevntu.version>1.29.0</sevntu.version>
<maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
<kemitix.checkstyle.ruleset.version>${project.version}</kemitix.checkstyle.ruleset.version>
<!--<kemitix.checkstyle.ruleset.level>5-complexity</kemitix.checkstyle.ruleset.level>-->

View file

@ -21,7 +21,7 @@
<url>https://github.com/kemitix/kemitix-checkstyle-ruleset</url>
<properties>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
<tiles-maven-plugin.version>2.11</tiles-maven-plugin.version>
<kemitix-tiles.version>0.8.1</kemitix-tiles.version>
<maven-resources-plugin.version>3.0.2</maven-resources-plugin.version>
</properties>

View file

@ -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"/>

View file

@ -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"/>

View file

@ -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"/>

View file

@ -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">

View file

@ -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"/>

View file

@ -17,7 +17,7 @@
<packaging>tile</packaging>
<properties>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
<tiles-maven-plugin.version>2.11</tiles-maven-plugin.version>
<kemitix-tiles.version>0.8.1</kemitix-tiles.version>
</properties>

View file

@ -1,8 +1,8 @@
<project>
<properties>
<maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
<checkstyle.version>8.7</checkstyle.version>
<sevntu.version>1.27.0</sevntu.version>
<checkstyle.version>8.10</checkstyle.version>
<sevntu.version>1.29.0</sevntu.version>
<kemitix.checkstyle.ruleset.version>4.0.1</kemitix.checkstyle.ruleset.version>
<kemitix.checkstyle.ruleset.level>5-complexity</kemitix.checkstyle.ruleset.level>
<kemitix.checkstyle.ruleset.location>net/kemitix/checkstyle-${kemitix.checkstyle.ruleset.level}.xml</kemitix.checkstyle.ruleset.location>