Change ruleset groupId/artifactId to net.kemitix.checkstyle.ruleset

Add tile maven-tile
Update README
This commit is contained in:
Paul Campbell 2018-01-16 22:23:33 +00:00
parent 1770e5aff1
commit faae9e9afa
10 changed files with 148 additions and 92 deletions

View file

@ -1,9 +1,11 @@
CHANGELOG
=========
3.4.1
4.0.0
-----
* Change ruleset groupId/artifactId to `net.kemitix.checkstyle/ruleset`
* Add maven-tile `net.kemitix.checkstyle:tile`
* \[bug] update the ruleset files
* Restore Header and JavadocPackage checks
* Add missing reasons for disabling checks

View file

@ -1,10 +1,9 @@
# kemitix-checkstyle-ruleset
Provides an extensive Checkstyle ruleset for use with Apache's `maven-checkstyle-plugin`.
Provides an extensive Checkstyle ruleset for use with Checkstyle, together with a fully configured maven-tile.
The ruleset includes checks from both the core Checkstyle library and from the Sevntu-Checkstyle library.
* [Requirements](#requirements)
* [Usage](#usage)
* [All Checks](#all-checks)
* [Enabled Checks](#enabled-checks)
@ -14,16 +13,32 @@ The ruleset includes checks from both the core Checkstyle library and from the S
* [Checkstyle](#checkstyle-1)
* [Sevntu](#sevntu-1)
## Requirements
* [maven-checkstyle-plugin](https://maven.apache.org/plugins/maven-checkstyle-plugin/) 2.17+
* [Checkstyle](http://checkstyle.sourceforge.net/) 7.0+
* [Sevntu-checkstyle](http://sevntu-checkstyle.github.io/sevntu.checkstyle/) 1.21.0+
## Usage
To use this ruleset add the plugin `kemitix-checktyle-ruleset-maven-plugin`.
The `maven-checkstyle-plugin` will be included automatically.
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>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<tiles>
<tile>net.kemitix.checkstyle:tile:4.0.0</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
```
The following levels implement increasingly strict rulesets:
@ -34,40 +49,11 @@ The following levels implement increasingly strict rulesets:
* 4-tweaks
* 5-complexity
The default ruleset from the maven-tile is 5-complexity. Other levels can be selected by setting the `kemitix.checkstyle.ruleset.level` to one the values above.
### Change from 2.x
In 2.x, the level was specified as the goal to invoke. In 3.x, there is only the 'check' goal.
The level is now specified as a configuration parameter. See the example below.
### Example
````
<properties>
<kemitix-checkstyle-ruleset.version>2.1.0</kemitix-checkstyle-ruleset.version>
<kemitix-checkstyle-ruleset.level>5-complexity</kemitix-checkstyle-ruleset.level>
</properties>
<build>
<plugins>
<plugin>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset-maven-plugin</artifactId>
<version>${kemitix-checkstyle-ruleset.version}</version>
<configuration>
<level>${kemitix-checkstyle-ruleset.level}</level>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
````
In 2.x, the level was specified as the goal to invoke. In 3.x, there is only the 'check' goal. The level is now specified as a configuration parameter. See the example below. The kemitix-checkstyle-maven-plugin has also been removed in favour of the maven-tile.
## All Checks
@ -2277,7 +2263,7 @@ enum InvalidConstants {
````
#### [FinalizeImplementation](http://sevntu-checkstyle.github.io/sevntu.checkstyle/apidocs/com/github/sevntu/checkstyle/checks/coding/FinalizeImplementationCheck.html)
Checks that the `finalize()` implementation doesn't ignore the base class implementation, and doesn't *only* call the base class implementation.
Checks that the `finalize()` implementation doesn't ignore the base class implementation, and doesn't *only* call the base class implementation.
Valid:
```java

View file

@ -14,14 +14,14 @@
<groupId>net.kemitix.checkstyle</groupId>
<artifactId>builder</artifactId>
<packaging>jar</packaging>
<version>3.4.1</version>
<version>4.0.0</version>
<properties>
<java.version>1.8</java.version>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
<kemitix-tiles.version>0.2.0</kemitix-tiles.version>
<checkstyle.version>8.7</checkstyle.version>
<checkstyle.version>8.6</checkstyle.version>
<sevntu.version>1.26.0</sevntu.version>
<lombok.version>1.16.18</lombok.version>
<spring-platform.version>Brussels-SR6</spring-platform.version>

View file

@ -1,10 +1,9 @@
# kemitix-checkstyle-ruleset
Provides an extensive Checkstyle ruleset for use with Apache's `maven-checkstyle-plugin`.
Provides an extensive Checkstyle ruleset for use with Checkstyle, together with a fully configured maven-tile.
The ruleset includes checks from both the core Checkstyle library and from the Sevntu-Checkstyle library.
* [Requirements](#requirements)
* [Usage](#usage)
* [All Checks](#all-checks)
* [Enabled Checks](#enabled-checks)
@ -14,16 +13,32 @@ The ruleset includes checks from both the core Checkstyle library and from the S
* [Checkstyle](#checkstyle-1)
* [Sevntu](#sevntu-1)
## Requirements
* [maven-checkstyle-plugin](https://maven.apache.org/plugins/maven-checkstyle-plugin/) 2.17+
* [Checkstyle](http://checkstyle.sourceforge.net/) 7.0+
* [Sevntu-checkstyle](http://sevntu-checkstyle.github.io/sevntu.checkstyle/) 1.21.0+
## Usage
To use this ruleset add the plugin `kemitix-checktyle-ruleset-maven-plugin`.
The `maven-checkstyle-plugin` will be included automatically.
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>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<tiles>
<tile>net.kemitix.checkstyle:tile:4.0.0</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
```
The following levels implement increasingly strict rulesets:
@ -34,40 +49,11 @@ The following levels implement increasingly strict rulesets:
* 4-tweaks
* 5-complexity
The default ruleset from the maven-tile is 5-complexity. Other levels can be selected by setting the `kemitix.checkstyle.ruleset.level` to one the values above.
### Change from 2.x
In 2.x, the level was specified as the goal to invoke. In 3.x, there is only the 'check' goal.
The level is now specified as a configuration parameter. See the example below.
### Example
````
<properties>
<kemitix-checkstyle-ruleset.version>2.1.0</kemitix-checkstyle-ruleset.version>
<kemitix-checkstyle-ruleset.level>5-complexity</kemitix-checkstyle-ruleset.level>
</properties>
<build>
<plugins>
<plugin>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset-maven-plugin</artifactId>
<version>${kemitix-checkstyle-ruleset.version}</version>
<configuration>
<level>${kemitix-checkstyle-ruleset.level}</level>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
````
In 2.x, the level was specified as the goal to invoke. In 3.x, there is only the 'check' goal. The level is now specified as a configuration parameter. See the example below. The kemitix-checkstyle-maven-plugin has also been removed in favour of the maven-tile.
## All Checks

View file

@ -1,5 +1,5 @@
Checks that the `finalize()` implementation doesn't ignore the base class implementation, and doesn't *only* call the base class implementation.
Checks that the `finalize()` implementation doesn't ignore the base class implementation, and doesn't *only* call the base class implementation.
Valid:
```java

View file

@ -6,13 +6,14 @@
<groupId>net.kemitix.checkstyle</groupId>
<artifactId>root</artifactId>
<version>3.4.1</version>
<version>4.0.0</version>
<packaging>pom</packaging>
<modules>
<module>builder</module>
<module>ruleset</module>
<module>regressions</module>
<module>tile</module>
</modules>
</project>

View file

@ -12,7 +12,7 @@
<groupId>net.kemitix.checkstyle</groupId>
<artifactId>regressions</artifactId>
<version>3.4.1</version>
<version>4.0.0</version>
<properties>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>

View file

@ -13,7 +13,7 @@
<groupId>net.kemitix.checkstyle</groupId>
<artifactId>ruleset</artifactId>
<version>3.4.1</version>
<version>4.0.0</version>
<packaging>jar</packaging>
<name>Kemitix Checkstyle Ruleset</name>

34
tile/pom.xml Normal file
View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-parent</artifactId>
<version>5.0.3</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>net.kemitix.checkstyle</groupId>
<artifactId>tile</artifactId>
<version>4.0.0</version>
<packaging>tile</packaging>
<properties>
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>${tiles-maven-plugin.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>

47
tile/tile.xml Normal file
View file

@ -0,0 +1,47 @@
<project>
<properties>
<maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
<checkstyle.version>8.6</checkstyle.version>
<sevntu.version>1.26.0</sevntu.version>
<kemitix.checkstyle.ruleset.version>3.4.0</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>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
<dependency>
<groupId>com.github.sevntu-checkstyle</groupId>
<artifactId>sevntu-checkstyle-maven-plugin</artifactId>
<version>${sevntu.version}</version>
</dependency>
<dependency>
<groupId>net.kemitix</groupId>
<artifactId>kemitix-checkstyle-ruleset</artifactId>
<version>${kemitix.checkstyle.ruleset.version}</version>
</dependency>
</dependencies>
<configuration>
<configLocation>${kemitix.checkstyle.ruleset.location}</configLocation>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>