diff --git a/builder/pom.xml b/builder/pom.xml index 5e4b51a..69feace 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -6,16 +6,15 @@ net.kemitix - kemitix-parent - 2.8.0 - + kemitix-checkstyle-ruleset-parent + 3.2.0-SNAPSHOT kemitix-checkstyle-ruleset-builder 3.2.0-SNAPSHOT jar - Kemitix Checkstyle Ruleset Builder + Kemitix Checkstyle :: Ruleset :: Builder Builder for the Kemitix Checkstyle Ruleset @@ -34,18 +33,25 @@ 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 + + + + io.spring.platform + platform-bom + ${spring-platform.version} + pom + import + + + + org.springframework.boot @@ -66,12 +72,6 @@ spring-boot-configuration-processor true - - org.projectlombok - lombok - ${lombok.version} - provided - com.speedment.common mapstream diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml deleted file mode 100644 index eee3810..0000000 --- a/plugin-sample/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - 2-naming - - 4.0.0 - - - net.kemitix - kemitix-checkstyle-ruleset-sample-parent - 3.2.0-SNAPSHOT - ../sample-parent - - - kemitix-checkstyle-ruleset-plugin-sample - 3.2.0-SNAPSHOT - - Kemitix Checkstyle Ruleset Plugin Sample - Sample usage of the Kemitix Checkstyle Ruleset 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/plugin/pom.xml b/plugin/pom.xml index 830dd43..8657d5a 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -12,28 +12,15 @@ kemitix-checkstyle-ruleset-maven-plugin maven-plugin - Kemitix Checkstyle Ruleset Maven Plugin + Kemitix Checkstyle :: Ruleset :: Plugin 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 @@ -85,70 +66,9 @@ org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - - -Xlint:unchecked - - true - true - 1.8 - 1.8 - - - - 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} - - - - - - + maven-plugin-plugin + ${maven-plugin-plugin.version} + 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..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; @@ -68,7 +65,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 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 836de62..ffb37ed 100644 --- a/pom.xml +++ b/pom.xml @@ -3,26 +3,25 @@ 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 - Kemitix Checkstyle Ruleset (Parent) + Kemitix Checkstyle :: Ruleset :: Parent Parent POM for the Kemitix Checkstyle Ruleset and it's Builder - UTF-8 - UTF-8 - 2.10.4 - 3.0.1 - 1.6 - 2.8.2 - 2.17 7.8 1.24.0 + 1.10.19 3.8.0 @@ -31,9 +30,7 @@ builder ruleset plugin - plugin-sample regressions - sample-parent @@ -51,90 +48,6 @@ 2016 - - 3.0.4 - - - - - The MIT License (MIT) - https://opensource.org/licenses/MIT - - - - - - Paul Campbell - pcampbell@kemitix.net - Kemitix - https://github.com/kemitix/ - - - - - - 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} - - - - - - @@ -150,16 +63,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/ - - diff --git a/regressions/pom.xml b/regressions/pom.xml index 77f8904..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 - Regression Tests + Kemitix Checkstyle :: Ruleset :: Regression Tests - 5-complexity + ${project.version} + 5-complexity + true + 2.4.4 org.immutables value - 2.4.4 + ${immutables.version} provided 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 deleted file mode 100644 index c91556d..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 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/ - - - -