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 8573a0374a
commit 68c4ca055a
8 changed files with 144 additions and 88 deletions

View file

@ -1,9 +1,11 @@
CHANGELOG 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 * \[bug] update the ruleset files
* Restore Header and JavadocPackage checks * Restore Header and JavadocPackage checks
* Add missing reasons for disabling checks * Add missing reasons for disabling checks

View file

@ -1,10 +1,9 @@
# kemitix-checkstyle-ruleset # 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. The ruleset includes checks from both the core Checkstyle library and from the Sevntu-Checkstyle library.
* [Requirements](#requirements)
* [Usage](#usage) * [Usage](#usage)
* [All Checks](#all-checks) * [All Checks](#all-checks)
* [Enabled Checks](#enabled-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) * [Checkstyle](#checkstyle-1)
* [Sevntu](#sevntu-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 ## Usage
To use this ruleset add the plugin `kemitix-checktyle-ruleset-maven-plugin`. The simplest way to use the ruleset is with the maven-tile:
The `maven-checkstyle-plugin` will be included automatically.
```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: The following levels implement increasingly strict rulesets:
@ -34,40 +49,11 @@ The following levels implement increasingly strict rulesets:
* 4-tweaks * 4-tweaks
* 5-complexity * 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 ### 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. 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.
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>
````
## All Checks ## All Checks

View file

@ -21,7 +21,7 @@
<tiles-maven-plugin.version>2.10</tiles-maven-plugin.version> <tiles-maven-plugin.version>2.10</tiles-maven-plugin.version>
<kemitix-tiles.version>0.2.0</kemitix-tiles.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> <sevntu.version>1.26.0</sevntu.version>
<lombok.version>1.16.18</lombok.version> <lombok.version>1.16.18</lombok.version>
<spring-platform.version>Brussels-SR6</spring-platform.version> <spring-platform.version>Brussels-SR6</spring-platform.version>

View file

@ -1,10 +1,9 @@
# kemitix-checkstyle-ruleset # 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. The ruleset includes checks from both the core Checkstyle library and from the Sevntu-Checkstyle library.
* [Requirements](#requirements)
* [Usage](#usage) * [Usage](#usage)
* [All Checks](#all-checks) * [All Checks](#all-checks)
* [Enabled Checks](#enabled-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) * [Checkstyle](#checkstyle-1)
* [Sevntu](#sevntu-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 ## Usage
To use this ruleset add the plugin `kemitix-checktyle-ruleset-maven-plugin`. The simplest way to use the ruleset is with the maven-tile:
The `maven-checkstyle-plugin` will be included automatically.
```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: The following levels implement increasingly strict rulesets:
@ -34,40 +49,11 @@ The following levels implement increasingly strict rulesets:
* 4-tweaks * 4-tweaks
* 5-complexity * 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 ### 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. 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.
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>
````
## All Checks ## All Checks

View file

@ -13,6 +13,7 @@
<module>builder</module> <module>builder</module>
<module>ruleset</module> <module>ruleset</module>
<module>regressions</module> <module>regressions</module>
<module>tile</module>
</modules> </modules>
</project> </project>

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>