From b28771989a2ad6135392e60e1b2fb09a1ce510b3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 30 May 2017 15:27:29 +0100 Subject: [PATCH 01/20] version: set to 3.2.0-SNAPSHOT --- builder/pom.xml | 2 +- plugin-sample/pom.xml | 4 ++-- plugin/pom.xml | 2 +- pom.xml | 2 +- regressions/pom.xml | 2 +- ruleset/pom.xml | 4 ++-- sample-parent/pom.xml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index aeb0f38..5e4b51a 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -12,7 +12,7 @@ kemitix-checkstyle-ruleset-builder - 3.1.0 + 3.2.0-SNAPSHOT jar Kemitix Checkstyle Ruleset Builder diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml index b49f4a4..eee3810 100644 --- a/plugin-sample/pom.xml +++ b/plugin-sample/pom.xml @@ -10,12 +10,12 @@ net.kemitix kemitix-checkstyle-ruleset-sample-parent - 3.1.0 + 3.2.0-SNAPSHOT ../sample-parent kemitix-checkstyle-ruleset-plugin-sample - 3.1.0 + 3.2.0-SNAPSHOT Kemitix Checkstyle Ruleset Plugin Sample Sample usage of the Kemitix Checkstyle Ruleset Plugin diff --git a/plugin/pom.xml b/plugin/pom.xml index 033cd51..830dd43 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -7,7 +7,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 3.1.0 + 3.2.0-SNAPSHOT kemitix-checkstyle-ruleset-maven-plugin diff --git a/pom.xml b/pom.xml index dcecdf7..836de62 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 3.1.0 + 3.2.0-SNAPSHOT pom Kemitix Checkstyle Ruleset (Parent) diff --git a/regressions/pom.xml b/regressions/pom.xml index 4a694c0..77f8904 100644 --- a/regressions/pom.xml +++ b/regressions/pom.xml @@ -5,7 +5,7 @@ kemitix-checkstyle-ruleset-sample-parent net.kemitix - 3.1.0 + 3.2.0-SNAPSHOT ../sample-parent 4.0.0 diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 0f7726b..0aa98b4 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -7,11 +7,11 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 3.1.0 + 3.2.0-SNAPSHOT kemitix-checkstyle-ruleset - 3.1.0 + 3.2.0-SNAPSHOT jar Kemitix Checkstyle Ruleset diff --git a/sample-parent/pom.xml b/sample-parent/pom.xml index 93d794d..c91556d 100644 --- a/sample-parent/pom.xml +++ b/sample-parent/pom.xml @@ -8,7 +8,7 @@ kemitix-checkstyle-ruleset-sample-parent pom - 3.1.0 + 3.2.0-SNAPSHOT Kemitix Checkstyle Ruleset Sample Parent Sample parent for modules that use kemitix-checkstyle-ruleset-maven-plugin From 253526ee97eaef43450e5599b765e7a5cab8fdfe Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 30 May 2017 22:39:35 +0100 Subject: [PATCH 02/20] travis-ci: deploy master only after PR is merged Without this, Travis CI will create two deploys, one for the PR and one after the PR is merged. We only want the merged version to be deployed. Deploy parent pom. --- travis-ci/travis-deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis-ci/travis-deploy.sh b/travis-ci/travis-deploy.sh index 5e59a85..d5f7775 100755 --- a/travis-ci/travis-deploy.sh +++ b/travis-ci/travis-deploy.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash -if [ "$TRAVIS_BRANCH" = 'master' ]; then +if [ "$TRAVIS_BRANCH" = 'master' ] && [ "$TRAVIS_PULL_REQUEST" == 'false' ]; then echo "Preparing to deploy to nexus..." openssl aes-256-cbc -K $encrypted_efec3258f55d_key -iv $encrypted_efec3258f55d_iv \ -in travis-ci/codesigning.asc.enc -out travis-ci/codesigning.asc -d echo "Signing key decrypted" gpg --batch --fast-import travis-ci/codesigning.asc echo "Signing key imported" - ./mvnw --projects plugin,ruleset --settings travis-ci/travis-settings.xml \ + ./mvnw --projects .,plugin,ruleset --settings travis-ci/travis-settings.xml \ -Dskip-Tests=true -P release -B deploy echo "Deploy complete" else From 2b8533273f2e469dfb62c9e62b70ee8124322e05 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 31 May 2017 12:10:06 +0100 Subject: [PATCH 03/20] Add level 0 Disabled --- README.md | 1 + .../checkstyle/ruleset/builder/RuleLevel.java | 1 + builder/src/main/resources/README-template.md | 1 + builder/src/main/resources/application.yml | 1 + .../ruleset/builder/CheckstyleWriterTest.java | 7 ++++--- .../net/kemitix/checkstyle-0-disabled.xml | 15 +++++++++++++++ 6 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 ruleset/src/main/resources/net/kemitix/checkstyle-0-disabled.xml diff --git a/README.md b/README.md index 5e53626..a58651e 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ The `maven-checkstyle-plugin` will be included automatically. The following levels implement increasingly strict rulesets: +* 0-disabled * 1-layout * 2-naming * 3-javadoc diff --git a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/RuleLevel.java b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/RuleLevel.java index 53cad91..cece07a 100644 --- a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/RuleLevel.java +++ b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/RuleLevel.java @@ -28,6 +28,7 @@ package net.kemitix.checkstyle.ruleset.builder; */ public enum RuleLevel { + DISABLED, LAYOUT, NAMING, JAVADOC, diff --git a/builder/src/main/resources/README-template.md b/builder/src/main/resources/README-template.md index a6f9614..efd53b7 100644 --- a/builder/src/main/resources/README-template.md +++ b/builder/src/main/resources/README-template.md @@ -27,6 +27,7 @@ The `maven-checkstyle-plugin` will be included automatically. The following levels implement increasingly strict rulesets: +* 0-disabled * 1-layout * 2-naming * 3-javadoc diff --git a/builder/src/main/resources/application.yml b/builder/src/main/resources/application.yml index ec5e0d0..e3ef8a4 100644 --- a/builder/src/main/resources/application.yml +++ b/builder/src/main/resources/application.yml @@ -1,6 +1,7 @@ output: directory: ruleset/src/main/resources/net/kemitix ruleset-files: + DISABLED: checkstyle-0-disabled.xml LAYOUT: checkstyle-1-layout.xml NAMING: checkstyle-2-naming.xml JAVADOC: checkstyle-3-javadoc.xml diff --git a/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleWriterTest.java b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleWriterTest.java index 1ad7836..5cd29f1 100644 --- a/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleWriterTest.java +++ b/builder/src/test/java/net/kemitix/checkstyle/ruleset/builder/CheckstyleWriterTest.java @@ -67,7 +67,8 @@ public class CheckstyleWriterTest { ruleName = "RegexpOnFilename"; ruleClassname = "com.puppycrawl.tools.checkstyle.checks.regexp.RegexpOnFilenameCheck"; outputProperties = new OutputProperties(); - outputFiles = new MapBuilder().put(getOutputFile(RuleLevel.LAYOUT)) + outputFiles = new MapBuilder().put(getOutputFile(RuleLevel.DISABLED)) + .put(getOutputFile(RuleLevel.LAYOUT)) .put(getOutputFile(RuleLevel.NAMING)) .put(getOutputFile(RuleLevel.JAVADOC)) .put(getOutputFile(RuleLevel.TWEAKS)) @@ -221,8 +222,8 @@ public class CheckstyleWriterTest { final ThrowableAssert.ThrowingCallable action = () -> checkstyleWriter.run(); //then assertThatThrownBy(action).isInstanceOf(CheckstyleWriterException.class) - .hasMessage( - String.format("java.nio.file.NoSuchFileException: %scheckstyle-LAYOUT.xml", + .hasMessageStartingWith( + String.format("java.nio.file.NoSuchFileException: %scheckstyle-", imaginary + FILE_SEPARATOR )); } diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-0-disabled.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-0-disabled.xml new file mode 100644 index 0000000..2471726 --- /dev/null +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-0-disabled.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + From 55abc1959f586bb8f475e992af0ecf5cf0f16bb3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 31 May 2017 18:17:59 +0100 Subject: [PATCH 04/20] travis-ci: publish code coverate to codecov --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 528aa2d..d43d3d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ install: true script: "./mvnw clean install" after_success: - "./travis-ci/travis-coveralls-report.sh" +- bash <(curl -s https://codecov.io/bash) - "./travis-ci/travis-deploy.sh" env: global: From a35c353cdf55b033ab996b2e65fdc5cdbc47fadb Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 1 Jun 2017 11:51:42 +0100 Subject: [PATCH 05/20] circle.yml: added --- circle.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 circle.yml diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..280d970 --- /dev/null +++ b/circle.yml @@ -0,0 +1,3 @@ +test: + override: + - ./mvnw clean install From de597e016474ee3e975e1bcce4d9d1cfec203f16 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 2 Jun 2017 19:26:52 +0100 Subject: [PATCH 06/20] pom.xml: normalise maven pom names --- builder/pom.xml | 2 +- plugin-sample/pom.xml | 4 ++-- plugin/pom.xml | 2 +- pom.xml | 2 +- regressions/pom.xml | 2 +- ruleset/pom.xml | 2 +- sample-parent/pom.xml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index 5e4b51a..d157b7c 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -15,7 +15,7 @@ 3.2.0-SNAPSHOT jar - Kemitix Checkstyle Ruleset Builder + Kemitix Checkstyle :: Ruleset :: Builder Builder for the Kemitix Checkstyle Ruleset diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml index eee3810..d244de8 100644 --- a/plugin-sample/pom.xml +++ b/plugin-sample/pom.xml @@ -17,7 +17,7 @@ kemitix-checkstyle-ruleset-plugin-sample 3.2.0-SNAPSHOT - Kemitix Checkstyle Ruleset Plugin Sample - Sample usage of the Kemitix Checkstyle Ruleset Plugin + Kemitix Checkstyle :: Ruleset :: Plugin :: Sample Usage + Sample usage of the Kemitix Checkstyle Ruleset Maven Plugin diff --git a/plugin/pom.xml b/plugin/pom.xml index 830dd43..01600a8 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -12,7 +12,7 @@ kemitix-checkstyle-ruleset-maven-plugin maven-plugin - Kemitix Checkstyle Ruleset Maven Plugin + Kemitix Checkstyle :: Ruleset :: Plugin Checkstyle configuration using the Kemitix Checkstyle Ruleset diff --git a/pom.xml b/pom.xml index 836de62..7380d0d 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 3.2.0-SNAPSHOT pom - Kemitix Checkstyle Ruleset (Parent) + Kemitix Checkstyle :: Ruleset :: Parent Parent POM for the Kemitix Checkstyle Ruleset and it's Builder diff --git a/regressions/pom.xml b/regressions/pom.xml index 77f8904..33211df 100644 --- a/regressions/pom.xml +++ b/regressions/pom.xml @@ -11,7 +11,7 @@ 4.0.0 kemitix-checkstyle-ruleset-regressions - Regression Tests + Kemitix Checkstyle :: Ruleset :: Regression Tests 5-complexity diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 0aa98b4..8f5ff42 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -14,7 +14,7 @@ 3.2.0-SNAPSHOT jar - Kemitix Checkstyle Ruleset + Kemitix Checkstyle :: Ruleset Checkstyle Ruleset for use by packages derived from kemitix-parent diff --git a/sample-parent/pom.xml b/sample-parent/pom.xml index c91556d..b795a1c 100644 --- a/sample-parent/pom.xml +++ b/sample-parent/pom.xml @@ -10,7 +10,7 @@ 3.2.0-SNAPSHOT - Kemitix Checkstyle Ruleset Sample Parent + Kemitix Checkstyle :: Ruleset :: Plugin :: Sample Parent Sample parent for modules that use kemitix-checkstyle-ruleset-maven-plugin From 67abe9ab5b45da537fe0fe287534e8733d836f54 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 3 Jun 2017 16:56:47 +0100 Subject: [PATCH 07/20] pom.xml: set java version as 1.8 --- pom.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pom.xml b/pom.xml index 7380d0d..dfa9a26 100644 --- a/pom.xml +++ b/pom.xml @@ -15,6 +15,8 @@ UTF-8 UTF-8 + 1.8 + 3.6.1 2.10.4 3.0.1 1.6 @@ -71,6 +73,20 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${java.version} + ${java.version} + + + + + release From 2bfdaa10871da057d2aa832edd861a16fb0c5ae7 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 18:36:29 +0100 Subject: [PATCH 08/20] plugin: pom.xml: use java.version property for compiler-plugin --- plugin/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index 01600a8..dbefc6d 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -93,8 +93,8 @@ true true - 1.8 - 1.8 + ${java.version} + ${java.version} From 6969d5459a8b1c7649a4b99d04993bad80e061b6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 18:40:39 +0100 Subject: [PATCH 09/20] plugin: pom.xml: use maven-plugin-plugin.version explicitly --- plugin/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/pom.xml b/plugin/pom.xml index dbefc6d..3e90752 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -83,6 +83,11 @@ + + org.apache.maven.plugins + maven-plugin-plugin + ${maven-plugin-plugin.version} + org.apache.maven.plugins maven-compiler-plugin From 0e0d2cc3c991558a289236abeb44b249f715a8b5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 18:42:12 +0100 Subject: [PATCH 10/20] plugin: CheckMojo: provide name for parameter 'level' --- .../java/net/kemitix/checkstyle/ruleset/plugin/CheckMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckMojo.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckMojo.java index 5e01571..6e6ed69 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckMojo.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckMojo.java @@ -68,7 +68,7 @@ public class CheckMojo extends AbstractMojo { @Parameter(defaultValue = "${localRepository}", readonly = true, required = true) private ArtifactRepository artifactRepository; - @Parameter(defaultValue = "5-complexity", readonly = true) + @Parameter(name = "level", defaultValue = "5-complexity", readonly = true) private String level = "5-complexity"; @Setter From f5eddc088fb78108734d48cb003bfe044e97ed41 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 19:01:16 +0100 Subject: [PATCH 11/20] builder: pom.xml: upgrade kemitix-parent to 3.0.0 * Specify Spring Platform as Brussels-SR2 --- builder/pom.xml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/builder/pom.xml b/builder/pom.xml index d157b7c..59811a4 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -7,7 +7,7 @@ net.kemitix kemitix-parent - 2.8.0 + 3.0.0 @@ -44,8 +44,21 @@ 4.3.0 7.8 1.24.0 + Brussels-SR2 + + + + io.spring.platform + platform-bom + ${spring-platform.version} + pom + import + + + + org.springframework.boot From a9ad65e9e6508d5941ee0c1a9ce0d04e8307b95b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 19:22:13 +0100 Subject: [PATCH 12/20] pom.xml: use kemitix-parent 3.0.0 as parent pom Updates to conform with checkstyle requirements this imposes. --- .../checkstyle/ruleset/plugin/CheckMojo.java | 43 +++--- .../ruleset/plugin/CheckstyleExecutor.java | 5 + .../plugin/DefaultCheckstyleExecutor.java | 1 + .../ruleset/plugin/package-info.java | 43 +++--- pom.xml | 127 +----------------- 5 files changed, 50 insertions(+), 169 deletions(-) diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckMojo.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckMojo.java index 6e6ed69..07f2d0c 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckMojo.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckMojo.java @@ -1,26 +1,23 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Paul Campbell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ +/** + * The MIT License (MIT) + * + * Copyright (c) 2017 Paul Campbell + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies + * or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE + * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ package net.kemitix.checkstyle.ruleset.plugin; diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckstyleExecutor.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckstyleExecutor.java index 212f3bf..d40db6a 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckstyleExecutor.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/CheckstyleExecutor.java @@ -42,5 +42,10 @@ interface CheckstyleExecutor { */ void performCheck(CheckConfiguration configuration) throws MojoExecutionException, MojoFailureException; + /** + * Set the logger to use. + * + * @param log the logger. + */ void setLog(Log log); } diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutor.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutor.java index 68f03c6..f3f066c 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutor.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/DefaultCheckstyleExecutor.java @@ -53,6 +53,7 @@ import java.util.Properties; * * @author Paul Campbell (pcampbell@kemitix.net) */ +@SuppressWarnings("classfanoutcomplexity") @RequiredArgsConstructor public class DefaultCheckstyleExecutor implements CheckstyleExecutor { diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/package-info.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/package-info.java index af77c05..a2bf527 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/package-info.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/package-info.java @@ -1,31 +1,22 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Paul Campbell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - /** - * . + * The MIT License (MIT) * - * @author Paul Campbell (pcampbell@kemitix.net) + * Copyright (c) 2017 Paul Campbell + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies + * or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE + * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package net.kemitix.checkstyle.ruleset.plugin; diff --git a/pom.xml b/pom.xml index dfa9a26..28de40b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,8 +3,13 @@ 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"> 4.0.0 + + net.kemitix + kemitix-parent + 3.0.0 + + - net.kemitix kemitix-checkstyle-ruleset-parent 3.2.0-SNAPSHOT pom @@ -13,18 +18,10 @@ Parent POM for the Kemitix Checkstyle Ruleset and it's Builder - UTF-8 - UTF-8 - 1.8 - 3.6.1 - 2.10.4 - 3.0.1 - 1.6 - 2.8.2 - 2.17 7.8 1.24.0 + 1.10.19 3.8.0 @@ -53,104 +50,6 @@ 2016 - - 3.0.4 - - - - - The MIT License (MIT) - https://opensource.org/licenses/MIT - - - - - - Paul Campbell - pcampbell@kemitix.net - Kemitix - https://github.com/kemitix/ - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${java.version} - ${java.version} - - - - - - - - release - - - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - - attach-javadocs - verify - - jar - - - - - - - org.apache.maven.plugins - maven-source-plugin - ${maven-source-plugin.version} - - - attach-sources - verify - - jar-no-fork - - - - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} - - ${gpg.passphrase} - - - - sign-artifacts - verify - - sign - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - ${maven-deploy-plugin.version} - - - - - - @@ -166,16 +65,4 @@ - - - sonatype-nexus-snapshots - Sonatype Nexus Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - - sonatype-nexus-staging - Nexus Release Repository - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - From 90901766f5ff071e3515c7ee26ad86f77fe500e9 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 19:43:43 +0100 Subject: [PATCH 13/20] builder: pom.xml: use project parent pom --- builder/pom.xml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index 59811a4..69feace 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -6,9 +6,8 @@ net.kemitix - kemitix-parent - 3.0.0 - + kemitix-checkstyle-ruleset-parent + 3.2.0-SNAPSHOT kemitix-checkstyle-ruleset-builder @@ -34,17 +33,11 @@ 2016 - 1.8 - UTF-8 - UTF-8 + Brussels-SR2 1.5.3.RELEASE - 3.8.0 2.3.5 1.0.0 4.3.0 - 7.8 - 1.24.0 - Brussels-SR2 @@ -79,12 +72,6 @@ spring-boot-configuration-processor true - - org.projectlombok - lombok - ${lombok.version} - provided - com.speedment.common mapstream From 674dde52abaa3b86be4d99c3b8f18726cb45ef45 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 19:49:01 +0100 Subject: [PATCH 14/20] regressions: pom.xml: use project parent pom --- regressions/pom.xml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/regressions/pom.xml b/regressions/pom.xml index 33211df..49f9b09 100644 --- a/regressions/pom.xml +++ b/regressions/pom.xml @@ -2,26 +2,28 @@ - - kemitix-checkstyle-ruleset-sample-parent - net.kemitix - 3.2.0-SNAPSHOT - ../sample-parent - 4.0.0 + + net.kemitix + kemitix-checkstyle-ruleset-parent + 3.2.0-SNAPSHOT + kemitix-checkstyle-ruleset-regressions Kemitix Checkstyle :: Ruleset :: Regression Tests - 5-complexity + ${project.version} + 5-complexity + true + 2.4.4 org.immutables value - 2.4.4 + ${immutables.version} provided From 173df1c95be219a31e6b82e648b9e00fb7fca599 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 20:01:23 +0100 Subject: [PATCH 15/20] plugin-sample: pom.xml: use project parent pom --- plugin-sample/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml index d244de8..6d1ee67 100644 --- a/plugin-sample/pom.xml +++ b/plugin-sample/pom.xml @@ -9,9 +9,8 @@ net.kemitix - kemitix-checkstyle-ruleset-sample-parent + kemitix-checkstyle-ruleset-parent 3.2.0-SNAPSHOT - ../sample-parent kemitix-checkstyle-ruleset-plugin-sample From 2aed1eaa600aeb38be6a1b7a9750e2ac03eb5f2c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 20:03:32 +0100 Subject: [PATCH 16/20] sample-parent: remove unused module --- pom.xml | 1 - sample-parent/pom.xml | 154 ------------------------------------------ 2 files changed, 155 deletions(-) delete mode 100644 sample-parent/pom.xml diff --git a/pom.xml b/pom.xml index 28de40b..fa1d6e1 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,6 @@ plugin plugin-sample regressions - sample-parent diff --git a/sample-parent/pom.xml b/sample-parent/pom.xml deleted file mode 100644 index b795a1c..0000000 --- a/sample-parent/pom.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - 4.0.0 - - net.kemitix - kemitix-checkstyle-ruleset-sample-parent - pom - - 3.2.0-SNAPSHOT - - Kemitix Checkstyle :: Ruleset :: Plugin :: Sample Parent - Sample parent for modules that use kemitix-checkstyle-ruleset-maven-plugin - - - ${project.version} - 5-complexity - - UTF-8 - UTF-8 - 2.10.4 - 3.0.1 - 1.6 - 2.8.2 - - - https://github.com/kemitix/kemitix-checkstyle-ruleset - - - The MIT License (MIT) - https://opensource.org/licenses/MIT - - - - scm:git:git@github.com:kemitix/kemitix-checkstyle-ruleset.git - scm:git:git@github.com:kemitix/kemitix-checkstyle-ruleset.git - git@github.com:kemitix/kemitix-checkstyle-ruleset.git - - - - Paul Campbell - pcampbell@kemitix.net - Kemitix - https://github.com/kemitix/ - - - - - - - net.kemitix - kemitix-checkstyle-ruleset-maven-plugin - ${kemitix-checkstyle-ruleset.version} - - ${kemitix-checkstyle-ruleset.level} - - - - validate - - check - - - - - - - - - release - - - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - - attach-javadocs - verify - - jar - - - - - - - org.apache.maven.plugins - maven-source-plugin - ${maven-source-plugin.version} - - - attach-sources - verify - - jar-no-fork - - - - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} - - ${gpg.passphrase} - - - - sign-artifacts - verify - - sign - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - ${maven-deploy-plugin.version} - - - - - - - - - sevntu-maven - sevntu-maven - http://sevntu-checkstyle.github.io/sevntu.checkstyle/maven2 - - - - - - sonatype-nexus-snapshots - Sonatype Nexus Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - - sonatype-nexus-staging - Nexus Release Repository - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - From 8cbee7caa6ba141110d16e0cfa51fb27cd6c19fb Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 20:06:22 +0100 Subject: [PATCH 17/20] plugin-sample: remove redundant module The regressions module performs the same function of exercising the plugin. --- plugin-sample/pom.xml | 22 ----------- .../net/kemitix/checkstyle/sample/Sample.java | 38 ------------------- pom.xml | 1 - 3 files changed, 61 deletions(-) delete mode 100644 plugin-sample/pom.xml delete mode 100644 plugin-sample/src/main/java/net/kemitix/checkstyle/sample/Sample.java diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml deleted file mode 100644 index 6d1ee67..0000000 --- a/plugin-sample/pom.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - 2-naming - - 4.0.0 - - - net.kemitix - kemitix-checkstyle-ruleset-parent - 3.2.0-SNAPSHOT - - - kemitix-checkstyle-ruleset-plugin-sample - 3.2.0-SNAPSHOT - - Kemitix Checkstyle :: Ruleset :: Plugin :: Sample Usage - Sample usage of the Kemitix Checkstyle Ruleset Maven Plugin - - diff --git a/plugin-sample/src/main/java/net/kemitix/checkstyle/sample/Sample.java b/plugin-sample/src/main/java/net/kemitix/checkstyle/sample/Sample.java deleted file mode 100644 index d52ad1b..0000000 --- a/plugin-sample/src/main/java/net/kemitix/checkstyle/sample/Sample.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * The MIT License (MIT) - * - * Copyright (c) 2017 Paul Campbell - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software - * and associated documentation files (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies - * or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -package net.kemitix.checkstyle.sample; - -/** - * Sample class to test the Kemitix Checkstyle Ruleset Maven Plugin against. - * - *

This sample is deliberately only valid for level 1-layout and 2-naming. The plugin should report errors for levels - * 3-javadoc and above.

- * - * @author Paul Campbell (paul.campbell@hubio.com) - */ -public class Sample { - - - public static void main(String[] args) { - System.out.println("Sample!"); - } -} diff --git a/pom.xml b/pom.xml index fa1d6e1..ffb37ed 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,6 @@ builder ruleset plugin - plugin-sample regressions From 6620ee2bec819e3c9acda091a4b327d1a064336c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 9 Jun 2017 20:13:31 +0100 Subject: [PATCH 18/20] plugin: pom.xml: remove redundant configuration This is all provided by kemitix-parent --- plugin/pom.xml | 85 -------------------------------------------------- 1 file changed, 85 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index 3e90752..8657d5a 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -16,24 +16,11 @@ Checkstyle configuration using the Kemitix Checkstyle Ruleset - 1.8 - UTF-8 - UTF-8 3.5.0 - 3.6.1 3.5 3.5 - 2.10.4 - 3.0.1 - 1.6 - 2.8.2 2.3.0 - 1.16.16 1.0.0 - 0.7.9 - 0.50 - 0.80 - 0 @@ -58,12 +45,6 @@ mojo-executor ${mojo-executor.version}
- - org.projectlombok - lombok - ${lombok.version} - provided - me.andrz map-builder @@ -88,72 +69,6 @@ maven-plugin-plugin ${maven-plugin-plugin.version} - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - - -Xlint:unchecked - - true - true - ${java.version} - ${java.version} - - - - org.jacoco - jacoco-maven-plugin - ${jacoco-maven-plugin.version} - - - - prepare-agent - - - - report - prepare-package - - report - - - - default-check - - check - - - - - - - CLASS - - *HelpMojo - - - - LINE - COVEREDRATIO - ${jacoco-class-line-covered-ratio} - - - INSTRUCTION - COVEREDRATIO - ${jacoco-class-instruction-covered-ratio} - - - CLASS - MISSEDCOUNT - ${jacoco-class-missed-count-maximum} - - - - - - From f5f69a006feed9e0a11fa16fc38a54ce4f011cf0 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 12 Jun 2017 09:48:06 +0100 Subject: [PATCH 19/20] version: set to 3.2.0 --- builder/pom.xml | 4 ++-- plugin/pom.xml | 2 +- pom.xml | 2 +- regressions/pom.xml | 2 +- ruleset/pom.xml | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index 69feace..af2b242 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -7,11 +7,11 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 3.2.0-SNAPSHOT + 3.2.0 kemitix-checkstyle-ruleset-builder - 3.2.0-SNAPSHOT + 3.2.0 jar Kemitix Checkstyle :: Ruleset :: Builder diff --git a/plugin/pom.xml b/plugin/pom.xml index 8657d5a..f16240c 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -7,7 +7,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 3.2.0-SNAPSHOT + 3.2.0 kemitix-checkstyle-ruleset-maven-plugin diff --git a/pom.xml b/pom.xml index ffb37ed..12ea188 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ kemitix-checkstyle-ruleset-parent - 3.2.0-SNAPSHOT + 3.2.0 pom Kemitix Checkstyle :: Ruleset :: Parent diff --git a/regressions/pom.xml b/regressions/pom.xml index 49f9b09..0bc97be 100644 --- a/regressions/pom.xml +++ b/regressions/pom.xml @@ -6,7 +6,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 3.2.0-SNAPSHOT + 3.2.0 kemitix-checkstyle-ruleset-regressions diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 8f5ff42..b45a60f 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -7,11 +7,11 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 3.2.0-SNAPSHOT + 3.2.0 kemitix-checkstyle-ruleset - 3.2.0-SNAPSHOT + 3.2.0 jar Kemitix Checkstyle :: Ruleset From 41124ccf55a8e17f6de29e37bcb2b777428342d8 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 12 Jun 2017 09:52:45 +0100 Subject: [PATCH 20/20] CHANGELOG --- CHANGELOG | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index fa87ae3..c74deb4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,17 @@ CHANGELOG ========= +3.2.0 +----- + +* Restructure module parent poms +* Upgrade kemitix-parent to 3.0.0 +* CheckMojo: provide name for parameter 'level' +* Normalise maven pom names +* circle.yml: added +* travis-ci: publish code coverate to codecov +* Add level 0 Disabled + 3.1.0 -----