From 5a8cf1b88436711fe7a4a6ca2a54401a238f2db4 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 14 Jan 2018 18:46:51 +0000 Subject: [PATCH 01/14] Version set to 3.4.1 --- builder/pom.xml | 2 +- pom.xml | 2 +- regressions/pom.xml | 2 +- ruleset/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index b5b8c7a..8454299 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -14,7 +14,7 @@ net.kemitix.checkstyle ruleset-builder jar - 3.4.0 + 3.4.1 1.8 diff --git a/pom.xml b/pom.xml index c7d9a5f..4e63de1 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.kemitix.checkstyle ruleset-root - 3.4.0 + 3.4.1 pom diff --git a/regressions/pom.xml b/regressions/pom.xml index f9540a2..d3c773a 100644 --- a/regressions/pom.xml +++ b/regressions/pom.xml @@ -12,7 +12,7 @@ net.kemitix.checkstyle ruleset-regressions - 3.4.0 + 3.4.1 2.10 diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 30ab568..7949cae 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -12,7 +12,7 @@ kemitix-checkstyle-ruleset - 3.4.0 + 3.4.1 jar Kemitix Checkstyle Ruleset From 54fa8f0be4bc3c9059abd6e96c7cf3634b3b3f3d Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 14 Jan 2018 19:13:13 +0000 Subject: [PATCH 02/14] [bug] update the ruleset files and add missing reasons for deactivated rules --- CHANGELOG | 6 +++ README.md | 44 +++++-------------- builder/src/main/resources/application.yml | 4 ++ .../net/kemitix/checkstyle-1-layout.xml | 1 - .../net/kemitix/checkstyle-2-naming.xml | 1 - .../net/kemitix/checkstyle-3-javadoc.xml | 5 +-- .../net/kemitix/checkstyle-4-tweaks.xml | 5 +-- .../net/kemitix/checkstyle-5-complexity.xml | 8 +--- 8 files changed, 23 insertions(+), 51 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 39bc793..885ac62 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,12 @@ CHANGELOG ========= +3.4.1 +----- + +* \[bug] update the ruleset files +* Add missing reasons for disabling checks + 3.4.0 ----- diff --git a/README.md b/README.md index 1475469..f76f6de 100644 --- a/README.md +++ b/README.md @@ -90,8 +90,8 @@ Rule|Level|Source|Enabled|Suppressible [AvoidModifiersForTypes](#avoidmodifiersfortypes)|unspecified|sevntu|| [AvoidNestedBlocks](#avoidnestedblocks)|complexity|checkstyle|Yes| [AvoidNotShortCircuitOperatorsForBoolean](#avoidnotshortcircuitoperatorsforboolean)|tweaks|sevntu|Yes| -[AvoidStarImport](#avoidstarimport)|layout|checkstyle|Yes| -[AvoidStaticImport](#avoidstaticimport)|complexity|checkstyle|Yes| +[AvoidStarImport](#avoidstarimport)|layout|checkstyle|| +[AvoidStaticImport](#avoidstaticimport)|complexity|checkstyle|| [BooleanExpressionComplexity](#booleanexpressioncomplexity)|complexity|checkstyle|Yes| [CatchParameterName](#catchparametername)|naming|checkstyle|Yes| [CauseParameterInException](#causeparameterinexception)|tweaks|sevntu|| @@ -414,37 +414,6 @@ Invalid: // ... } ```` -#### [AvoidStarImport](http://checkstyle.sourceforge.net/config_imports.html#AvoidStarImport) - -Prevents the use of the star import. - -Invalid: -```` -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; -import javax.swing.event.*; -```` -#### [AvoidStaticImport](http://checkstyle.sourceforge.net/config_imports.html#AvoidStaticImport) - -Prevents importing static members, unless they are one of the following: - -* `org.assertj.core.api.Assertions.assertThat` -* `org.mockito.BDDMockito.given` -* `org.mockito.Mockito.*` -* `org.mockito.Matchers.*` -* `org.mockito.Mockito.*` - -Valid: -```` -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.BDDMockito.given; -```` - -Invalid: -```` -import static java.nio.charset.StandardCharsets.UTF_8; -```` #### [BooleanExpressionComplexity](http://checkstyle.sourceforge.net/config_metrics.html#BooleanExpressionComplexity) Restrict the number of number of &&, ||, &, | and ^ in an expression to 2. @@ -1233,7 +1202,7 @@ Checks that paragraphs in Javadoc blocks are wrapped in `

` elements and have Checks the formatting of the Javadoc blocks. See the official [Checkstyle documentation](http://checkstyle.sourceforge.net/config_javadoc.html#JavadocStyle) for all the checks that are applied. #### [JavadocType](http://checkstyle.sourceforge.net/config_javadoc.html#JavadocType) -Checks the format for Javadoc for classes and enums. Javadoc must be present, not have any unknown tags and not missing any `@param` tags. The `@author` tag must have a name and, in brackets, an email address. +Checks the format for Javadoc for classes and enums. Javadoc must be present, not have any unknown tags and not missing any `@param` tags. #### [JavaNCSS](http://checkstyle.sourceforge.net/config_metrics.html#JavaNCSS) Restricts the NCSS score for methods, classes and files to 40, 1200 and 1600 respectively. The NCSS score is a measure of the number of statements within a scope. @@ -2681,6 +2650,13 @@ These checks are not enabled. Notes are included for each explaining why. #### [ArrayTrailingComma](http://checkstyle.sourceforge.net/config_coding.html#ArrayTrailingComma) Couldn't get my IDE's (IntelliJ) code style to match. +#### [AvoidStarImport](http://checkstyle.sourceforge.net/config_imports.html#AvoidStarImport) + +Ref: Clean Code, Robert C. Martin, J1: Avoid Long Import Lists by Using Wildcards +#### [AvoidStaticImport](http://checkstyle.sourceforge.net/config_imports.html#AvoidStaticImport) + +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. #### [FinalLocalVariable](http://checkstyle.sourceforge.net/config_coding.html#FinalLocalVariable) Doesn't recognise Lombok's `val` as being `final`. diff --git a/builder/src/main/resources/application.yml b/builder/src/main/resources/application.yml index 5920a78..c62a87b 100644 --- a/builder/src/main/resources/application.yml +++ b/builder/src/main/resources/application.yml @@ -103,6 +103,7 @@ rules: level: LAYOUT enabled: false source: CHECKSTYLE + reason: "Ref: Clean Code, Robert C. Martin, J1: Avoid Long Import Lists by Using Wildcards" uri: http://checkstyle.sourceforge.net/config_imports.html#AvoidStarImport - name: AvoidStaticImport @@ -110,6 +111,9 @@ rules: level: COMPLEXITY enabled: false source: CHECKSTYLE + reason: "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." uri: http://checkstyle.sourceforge.net/config_imports.html#AvoidStaticImport properties: excludes: org.assertj.core.api.Assertions.assertThat,org.mockito.BDDMockito.given,org.mockito.Mockito.*,org.mockito.Matchers.*,org.mockito.Mockito.* diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml index 8b69e34..4c5422e 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml @@ -22,7 +22,6 @@ - diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml index 330545e..8b7de69 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml @@ -25,7 +25,6 @@ - diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml index 00f2043..51a0531 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml @@ -31,7 +31,6 @@ - @@ -51,9 +50,7 @@ - - - + diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml index 0358887..d9dbcb1 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml @@ -34,7 +34,6 @@ - @@ -78,9 +77,7 @@ - - - + diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml index e3a5f44..87eebaa 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml @@ -38,10 +38,6 @@ - - - - @@ -99,9 +95,7 @@ - - - + From 5b5c0673a007133eca1ee7cfcd69492adaad2a33 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 14 Jan 2018 19:13:34 +0000 Subject: [PATCH 03/14] Restore Header and JavadocPackage checks --- CHANGELOG | 1 + builder/src/main/resources/application.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 885ac62..f6a1f07 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ CHANGELOG ----- * \[bug] update the ruleset files +* Restore Header and JavadocPackage checks * Add missing reasons for disabling checks 3.4.0 diff --git a/builder/src/main/resources/application.yml b/builder/src/main/resources/application.yml index c62a87b..7d504a7 100644 --- a/builder/src/main/resources/application.yml +++ b/builder/src/main/resources/application.yml @@ -328,7 +328,7 @@ rules: name: Header parent: CHECKER level: LAYOUT - enabled: false + enabled: true source: CHECKSTYLE uri: http://checkstyle.sourceforge.net/config_header.html#Header properties: @@ -431,7 +431,7 @@ rules: name: JavadocPackage parent: CHECKER level: JAVADOC - enabled: false + enabled: true source: CHECKSTYLE uri: http://checkstyle.sourceforge.net/config_javadoc.html#JavadocPackage - From 1770e5aff108bcfea1014d90c4877e1d5813e377 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 16 Jan 2018 17:38:36 +0000 Subject: [PATCH 04/14] Simplify groupId and artifactId under net.kemitix.checkstyle --- builder/pom.xml | 2 +- pom.xml | 2 +- regressions/pom.xml | 2 +- ruleset/pom.xml | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index 8454299..9d8d5fa 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -12,7 +12,7 @@ net.kemitix.checkstyle - ruleset-builder + builder jar 3.4.1 diff --git a/pom.xml b/pom.xml index 4e63de1..432a7a2 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 net.kemitix.checkstyle - ruleset-root + root 3.4.1 pom diff --git a/regressions/pom.xml b/regressions/pom.xml index d3c773a..5776846 100644 --- a/regressions/pom.xml +++ b/regressions/pom.xml @@ -11,7 +11,7 @@ net.kemitix.checkstyle - ruleset-regressions + regressions 3.4.1 diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 7949cae..6f5df84 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -11,7 +11,8 @@ - kemitix-checkstyle-ruleset + net.kemitix.checkstyle + ruleset 3.4.1 jar From faae9e9afaba4196871d9c3312162a58e475bd2e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 16 Jan 2018 22:23:33 +0000 Subject: [PATCH 05/14] Change ruleset groupId/artifactId to net.kemitix.checkstyle.ruleset Add tile maven-tile Update README --- CHANGELOG | 4 +- README.md | 72 ++++++++----------- builder/pom.xml | 4 +- builder/src/main/resources/README-template.md | 70 ++++++++---------- .../resources/rules/FinalizeImplementation.md | 2 +- pom.xml | 3 +- regressions/pom.xml | 2 +- ruleset/pom.xml | 2 +- tile/pom.xml | 34 +++++++++ tile/tile.xml | 47 ++++++++++++ 10 files changed, 148 insertions(+), 92 deletions(-) create mode 100644 tile/pom.xml create mode 100644 tile/tile.xml diff --git a/CHANGELOG b/CHANGELOG index f6a1f07..4352587 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/README.md b/README.md index f76f6de..6e420fa 100644 --- a/README.md +++ b/README.md @@ -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 + + + 2.10 + + + + + io.repaint.maven + tiles-maven-plugin + ${tiles-maven-plugin.version} + true + + + net.kemitix.checkstyle:tile:4.0.0 + + + + + + +``` 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 - -```` - - 2.1.0 - 5-complexity - - - - - - net.kemitix - kemitix-checkstyle-ruleset-maven-plugin - ${kemitix-checkstyle-ruleset.version} - - ${kemitix-checkstyle-ruleset.level} - - - - validate - - check - - - - - - -```` +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 diff --git a/builder/pom.xml b/builder/pom.xml index 9d8d5fa..498575f 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -14,14 +14,14 @@ net.kemitix.checkstyle builder jar - 3.4.1 + 4.0.0 1.8 2.10 0.2.0 - 8.7 + 8.6 1.26.0 1.16.18 Brussels-SR6 diff --git a/builder/src/main/resources/README-template.md b/builder/src/main/resources/README-template.md index efd53b7..98c3585 100644 --- a/builder/src/main/resources/README-template.md +++ b/builder/src/main/resources/README-template.md @@ -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 + + + 2.10 + + + + + io.repaint.maven + tiles-maven-plugin + ${tiles-maven-plugin.version} + true + + + net.kemitix.checkstyle:tile:4.0.0 + + + + + + +``` 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 - -```` - - 2.1.0 - 5-complexity - - - - - - net.kemitix - kemitix-checkstyle-ruleset-maven-plugin - ${kemitix-checkstyle-ruleset.version} - - ${kemitix-checkstyle-ruleset.level} - - - - validate - - check - - - - - - -```` +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 diff --git a/builder/src/main/resources/rules/FinalizeImplementation.md b/builder/src/main/resources/rules/FinalizeImplementation.md index 323e07e..6d5f9c1 100644 --- a/builder/src/main/resources/rules/FinalizeImplementation.md +++ b/builder/src/main/resources/rules/FinalizeImplementation.md @@ -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 diff --git a/pom.xml b/pom.xml index 432a7a2..82b2a1c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,13 +6,14 @@ net.kemitix.checkstyle root - 3.4.1 + 4.0.0 pom builder ruleset regressions + tile diff --git a/regressions/pom.xml b/regressions/pom.xml index 5776846..8fc684a 100644 --- a/regressions/pom.xml +++ b/regressions/pom.xml @@ -12,7 +12,7 @@ net.kemitix.checkstyle regressions - 3.4.1 + 4.0.0 2.10 diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 6f5df84..098e75f 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -13,7 +13,7 @@ net.kemitix.checkstyle ruleset - 3.4.1 + 4.0.0 jar Kemitix Checkstyle Ruleset diff --git a/tile/pom.xml b/tile/pom.xml new file mode 100644 index 0000000..f25ee16 --- /dev/null +++ b/tile/pom.xml @@ -0,0 +1,34 @@ + + + + net.kemitix + kemitix-parent + 5.0.3 + + + 4.0.0 + + net.kemitix.checkstyle + tile + 4.0.0 + + tile + + + 2.10 + + + + + + io.repaint.maven + tiles-maven-plugin + ${tiles-maven-plugin.version} + true + + + + + diff --git a/tile/tile.xml b/tile/tile.xml new file mode 100644 index 0000000..5bbca56 --- /dev/null +++ b/tile/tile.xml @@ -0,0 +1,47 @@ + + + 2.17 + 8.6 + 1.26.0 + 3.4.0 + 5-complexity + net/kemitix/checkstyle-${kemitix.checkstyle.ruleset.level}.xml + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + com.github.sevntu-checkstyle + sevntu-checkstyle-maven-plugin + ${sevntu.version} + + + net.kemitix + kemitix-checkstyle-ruleset + ${kemitix.checkstyle.ruleset.version} + + + + ${kemitix.checkstyle.ruleset.location} + + + + verify + + check + + + + + + + From bbeae5b56ced0c9a795349bef3bab1de17e1ff5d Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 16 Jan 2018 22:24:23 +0000 Subject: [PATCH 06/14] Add local checkstyle plugin config for builder Builder can't access the current version of the tile during build, so it needs its own checkstyle config declaration. --- builder/pom.xml | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/builder/pom.xml b/builder/pom.xml index 498575f..fd0f8ac 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -30,6 +30,11 @@ 1.0.0 2.13.0 3.9.0 + + 2.17 + 3.4.0 + 5-complexity + net/kemitix/checkstyle-${kemitix.checkstyle.ruleset.level}.xml @@ -120,7 +125,6 @@ net.kemitix.tiles:maven-plugins-tile:${kemitix-tiles.version} net.kemitix.tiles:enforcer-tile:${kemitix-tiles.version} net.kemitix.tiles:compiler-tile:${kemitix-tiles.version} - net.kemitix.tiles:huntbugs-tile:${kemitix-tiles.version} net.kemitix.tiles:pmd-tile:${kemitix-tiles.version} net.kemitix.tiles:testing-tile:${kemitix-tiles.version} @@ -144,6 +148,39 @@ + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + com.github.sevntu-checkstyle + sevntu-checkstyle-maven-plugin + ${sevntu.version} + + + net.kemitix + kemitix-checkstyle-ruleset + ${kemitix.checkstyle.ruleset.version} + + + + ${kemitix.checkstyle.ruleset.location} + + + + verify + + check + + + + From 06b14df6cddade8afc1f18906565bcae7157622e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 16 Jan 2018 22:28:07 +0000 Subject: [PATCH 07/14] Run builder during package phase This should help to avoid forgetting to update the ruleset and readme in future. --- builder/pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builder/pom.xml b/builder/pom.xml index fd0f8ac..1c8c740 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -142,8 +142,9 @@ + package - repackage + run From 09f1f3eb5ff96585c17ec58aa57f8b0f58029899 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 16 Jan 2018 22:36:27 +0000 Subject: [PATCH 08/14] Prevent installation of support modules --- builder/pom.xml | 1 + pom.xml | 4 ++++ regressions/pom.xml | 1 + 3 files changed, 6 insertions(+) diff --git a/builder/pom.xml b/builder/pom.xml index 1c8c740..73247d7 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -17,6 +17,7 @@ 4.0.0 + true 1.8 2.10 0.2.0 diff --git a/pom.xml b/pom.xml index 82b2a1c..ea633af 100644 --- a/pom.xml +++ b/pom.xml @@ -9,6 +9,10 @@ 4.0.0 pom + + true + + builder ruleset diff --git a/regressions/pom.xml b/regressions/pom.xml index 8fc684a..093e54d 100644 --- a/regressions/pom.xml +++ b/regressions/pom.xml @@ -15,6 +15,7 @@ 4.0.0 + true 2.10 0.2.0 From 4a511dd4d5ca3fa8b0245fed62ea4aa22108b2d1 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 17 Jan 2018 18:40:46 +0000 Subject: [PATCH 09/14] Update travis-support --- .travis-support | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis-support b/.travis-support index b8593e5..b97def2 160000 --- a/.travis-support +++ b/.travis-support @@ -1 +1 @@ -Subproject commit b8593e541ba9a11447fa9559a83e5f99097ca4d2 +Subproject commit b97def251b784ecc8de6d3cc30d2793ac0bd375e From 14a038c9f36f018238e55f1963e4153e0fdfd774 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 17 Jan 2018 18:41:42 +0000 Subject: [PATCH 10/14] Update checkstyle groupId/artifactId/version in support modules --- builder/pom.xml | 6 +++--- tile/tile.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index 73247d7..01f8d10 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -33,7 +33,7 @@ 3.9.0 2.17 - 3.4.0 + ${project.version} 5-complexity net/kemitix/checkstyle-${kemitix.checkstyle.ruleset.level}.xml @@ -166,8 +166,8 @@ ${sevntu.version} - net.kemitix - kemitix-checkstyle-ruleset + net.kemitix.checkstyle + ruleset ${kemitix.checkstyle.ruleset.version} diff --git a/tile/tile.xml b/tile/tile.xml index 5bbca56..913b40b 100644 --- a/tile/tile.xml +++ b/tile/tile.xml @@ -3,7 +3,7 @@ 2.17 8.6 1.26.0 - 3.4.0 + 4.0.0 5-complexity net/kemitix/checkstyle-${kemitix.checkstyle.ruleset.level}.xml @@ -25,8 +25,8 @@ ${sevntu.version} - net.kemitix - kemitix-checkstyle-ruleset + net.kemitix.checkstyle + ruleset ${kemitix.checkstyle.ruleset.version} From 7ae51727a27e5e75510d5c9a9198d95ebce084d6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 17 Jan 2018 19:10:55 +0000 Subject: [PATCH 11/14] Upgrade maven-checkstyle-plugin to 3.0.0 --- CHANGELOG | 1 + builder/pom.xml | 2 +- tile/tile.xml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4352587..ce62d42 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ CHANGELOG 4.0.0 ----- +* Upgrade to `maven-checkstyle-plugin` 3.0.0 * Change ruleset groupId/artifactId to `net.kemitix.checkstyle/ruleset` * Add maven-tile `net.kemitix.checkstyle:tile` * \[bug] update the ruleset files diff --git a/builder/pom.xml b/builder/pom.xml index 01f8d10..a085803 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -32,7 +32,7 @@ 2.13.0 3.9.0 - 2.17 + 3.0.0 ${project.version} 5-complexity net/kemitix/checkstyle-${kemitix.checkstyle.ruleset.level}.xml diff --git a/tile/tile.xml b/tile/tile.xml index 913b40b..f87d3e6 100644 --- a/tile/tile.xml +++ b/tile/tile.xml @@ -1,6 +1,6 @@ - 2.17 + 3.0.0 8.6 1.26.0 4.0.0 From f5c9cbe2fa382afcf3d4ccc2b0d663a8cce8f505 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 17 Jan 2018 19:50:43 +0000 Subject: [PATCH 12/14] Regressions use own checkstyle config --- regressions/pom.xml | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/regressions/pom.xml b/regressions/pom.xml index 093e54d..059099b 100644 --- a/regressions/pom.xml +++ b/regressions/pom.xml @@ -19,8 +19,14 @@ 2.10 0.2.0 + 8.6 + 1.26.0 + 3.0.0 + ${project.version} + - 0-disabled + 0-disabled + net/kemitix/checkstyle-${kemitix.checkstyle.ruleset.level}.xml net.kemitix.checkstyle.regressions true 2.5.6 @@ -44,10 +50,44 @@ true - net.kemitix.tiles:checkstyle-tile:${kemitix-tiles.version} + net.kemitix.tiles:maven-plugins-tile:${kemitix-tiles.version} + net.kemitix.tiles:compiler-tile:${kemitix-tiles.version} + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + com.github.sevntu-checkstyle + sevntu-checkstyle-maven-plugin + ${sevntu.version} + + + net.kemitix.checkstyle + ruleset + ${kemitix.checkstyle.ruleset.version} + + + + ${kemitix.checkstyle.ruleset.location} + + + + verify + + check + + + + From 55e784fe2fc8521d24fc1dcb2fbf4a90d4b18577 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 17 Jan 2018 19:52:15 +0000 Subject: [PATCH 13/14] ruleset uses UTF-8 encoding --- ruleset/pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 098e75f..f445b7f 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -23,6 +23,7 @@ 2.10 0.2.0 + 3.0.2 @@ -62,6 +63,14 @@ + + org.apache.maven.plugins + maven-resources-plugin + ${maven-resources-plugin.version} + + UTF-8 + + From 6444f5b5923ca3df6bf87f84f6503b2ea067d2d2 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 17 Jan 2018 19:53:58 +0000 Subject: [PATCH 14/14] tile use tiles --- tile/pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tile/pom.xml b/tile/pom.xml index f25ee16..016fe39 100644 --- a/tile/pom.xml +++ b/tile/pom.xml @@ -18,6 +18,7 @@ 2.10 + 0.2.0 @@ -27,6 +28,12 @@ tiles-maven-plugin ${tiles-maven-plugin.version} true + + + net.kemitix.tiles:maven-plugins-tile:${kemitix-tiles.version} + net.kemitix.tiles:release-tile:${kemitix-tiles.version} + +