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: 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 @@ + + + + + + + + + + + + +