diff --git a/checkstyle-sonar-plugin/src/main/resources/com/sonar/sqale/checkstyle-model.xml b/checkstyle-sonar-plugin/src/main/resources/com/sonar/sqale/checkstyle-model.xml index 0bfc927d..c62c0970 100644 --- a/checkstyle-sonar-plugin/src/main/resources/com/sonar/sqale/checkstyle-model.xml +++ b/checkstyle-sonar-plugin/src/main/resources/com/sonar/sqale/checkstyle-model.xml @@ -487,6 +487,19 @@ min + + checkstyle + com.puppycrawl.tools.checkstyle.checks.whitespace.SeparatorWrapCheck + + remediationFunction + CONSTANT_ISSUE + + + offset + 5 + min + + checkstyle com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTagContinuationIndentationCheck @@ -946,6 +959,19 @@ h + + checkstyle + com.puppycrawl.tools.checkstyle.checks.DescendantTokenCheck + + remediationFunction + CONSTANT_ISSUE + + + offset + 1 + h + + checkstyle com.puppycrawl.tools.checkstyle.checks.sizes.FileLengthCheck @@ -998,6 +1024,19 @@ h + + checkstyle + com.puppycrawl.tools.checkstyle.checks.metrics.CyclomaticComplexityCheck + + remediationFunction + CONSTANT_ISSUE + + + offset + 3 + h + + checkstyle com.puppycrawl.tools.checkstyle.checks.coding.IllegalTokenTextCheck diff --git a/checkstyle-sonar-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRulesDefinitionTest.java b/checkstyle-sonar-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRulesDefinitionTest.java index 134f11d8..4d36c717 100644 --- a/checkstyle-sonar-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRulesDefinitionTest.java +++ b/checkstyle-sonar-plugin/src/test/java/org/sonar/plugins/checkstyle/CheckstyleRulesDefinitionTest.java @@ -23,7 +23,6 @@ import java.util.List; -import org.junit.Ignore; import org.junit.Test; import org.sonar.api.server.rule.RulesDefinition; @@ -38,14 +37,15 @@ public class CheckstyleRulesDefinitionTest { "com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck", "com.puppycrawl.tools.checkstyle.checks.regexp.RegexpMultilineCheck", "com.puppycrawl.tools.checkstyle.checks.regexp.RegexpOnFilenameCheck", - "com.puppycrawl.tools.checkstyle.checks.RegexpCheck", + "com.puppycrawl.tools.checkstyle.checks.regexp.RegexpCheck", "com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderCheck", "com.puppycrawl.tools.checkstyle.checks.imports.ImportControlCheck", - "com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationLocationCheck" + "com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationLocationCheck", + "com.puppycrawl.tools.checkstyle.checks.SuppressWarningsHolder", + "com.puppycrawl.tools.checkstyle.checks.FileContentsHolder" ); @Test - @Ignore public void test() { final CheckstyleRulesDefinition definition = new CheckstyleRulesDefinition(); final RulesDefinition.Context context = new RulesDefinition.Context(); @@ -57,7 +57,7 @@ public void test() { assertThat(repository.language()).isEqualTo("java"); final List rules = repository.rules(); - assertThat(rules).hasSize(150); + assertThat(rules).hasSize(154); for (RulesDefinition.Rule rule : rules) { assertThat(rule.key()).isNotNull(); @@ -76,15 +76,11 @@ public void test() { if (NO_SQALE.contains(rule.key())) { assertThat(rule.debtRemediationFunction()).overridingErrorMessage( "Sqale remediation function is set for rule '" + rule.key()).isNull(); - assertThat(rule.debtSubCharacteristic()).overridingErrorMessage( - "Sqale characteristic is set for rule '" + rule.key()).isNull(); } else { assertThat(rule.debtRemediationFunction()).overridingErrorMessage( "Sqale remediation function is not set for rule '" + rule.key()) .isNotNull(); - assertThat(rule.debtSubCharacteristic()).overridingErrorMessage( - "Sqale characteristic is not set for rule '" + rule.key()).isNotNull(); } } }