From 457ece9fd5bc1e66b21d142d6502fae5aadd7fb0 Mon Sep 17 00:00:00 2001 From: Roman Ivanov Date: Sun, 30 Dec 2018 05:56:49 -0800 Subject: [PATCH] Issue #180: upgrade to checkstyle 8.16 --- README.md | 1 + .../resources/com/sonar/sqale/checkstyle-model.xml | 13 +++++++++++++ .../resources/org/sonar/l10n/checkstyle.properties | 3 +++ ...ks.modifier.ClassMemberImpliedModifierCheck.html | 6 ++++++ .../org/sonar/plugins/checkstyle/rules.xml | 13 +++++++++++++ .../checkstyle/CheckstyleRulesDefinitionTest.java | 2 +- pom.xml | 2 +- 7 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 checkstyle-sonar-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.modifier.ClassMemberImpliedModifierCheck.html diff --git a/README.md b/README.md index cb0bc050..0aabdff9 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ This plugin provides coding rules from [Checkstyle](http://checkstyle.sourceforg Checkstyle Plugin|Sonar|Checkstyle|Jdk -----------------|-----|----------|--- +4.16|5.6.6|8.16|1.8 4.15|5.6.6|8.15|1.8 4.14|5.6.6|8.14|1.8 4.13|5.6.6|8.13|1.8 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 e8345cc6..e8c81450 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 @@ -578,6 +578,19 @@ min + + checkstyle + com.puppycrawl.tools.checkstyle.checks.modifier.ClassMemberImpliedModifierCheck + + remediationFunction + CONSTANT_ISSUE + + + offset + 2 + min + + checkstyle com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAfterCheck diff --git a/checkstyle-sonar-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties b/checkstyle-sonar-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties index 221946e1..e9dcf433 100644 --- a/checkstyle-sonar-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties +++ b/checkstyle-sonar-plugin/src/main/resources/org/sonar/l10n/checkstyle.properties @@ -164,6 +164,9 @@ rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.modifier.InterfaceMemberI rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.modifier.InterfaceMemberImpliedModifierCheck.param.violateImpliedAbstractMethod=Control whether to enforce that abstract is explicitly coded on interface methods. rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.modifier.InterfaceMemberImpliedModifierCheck.param.violateImpliedPublicNested=Control whether to enforce that public is explicitly coded on interface nested types. rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.modifier.InterfaceMemberImpliedModifierCheck.param.violateImpliedStaticNested=Control whether to enforce that static is explicitly coded on interface nested types. +rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.modifier.ClassMemberImpliedModifierCheck.name=Class Member Implied Modifier +rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.modifier.ClassMemberImpliedModifierCheck.param.violateImpliedStaticOnNestedEnum=Control whether to enforce that static is explicitly coded on nested enums in classes. +rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.modifier.ClassMemberImpliedModifierCheck.param.violateImpliedStaticOnNestedInterface=Control whether to enforce that static is explicitly coded on nested interfaces in classes. rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck.name=Empty For Initializer Pad rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyForInitializerPadCheck.param.option=policy on how to pad an empty for iterator rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck.name=Javadoc Style diff --git a/checkstyle-sonar-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.modifier.ClassMemberImpliedModifierCheck.html b/checkstyle-sonar-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.modifier.ClassMemberImpliedModifierCheck.html new file mode 100644 index 00000000..dd824116 --- /dev/null +++ b/checkstyle-sonar-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle/com.puppycrawl.tools.checkstyle.checks.modifier.ClassMemberImpliedModifierCheck.html @@ -0,0 +1,6 @@ +
+
+Checks for implicit modifiers on nested types in classes. +see full documentation at ClassMemberImpliedModifier +
+
diff --git a/checkstyle-sonar-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml b/checkstyle-sonar-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml index c818893c..bf52318e 100644 --- a/checkstyle-sonar-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml +++ b/checkstyle-sonar-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml @@ -2114,4 +2114,17 @@ + + MINOR + + + + + true + + + true + + + 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 cdba39f7..8cf6cf9b 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 @@ -56,7 +56,7 @@ public void test() { assertThat(repository.language()).isEqualTo("java"); final List rules = repository.rules(); - assertThat(rules).hasSize(156); + assertThat(rules).hasSize(157); for (RulesDefinition.Rule rule : rules) { assertThat(rule.key()).isNotNull(); diff --git a/pom.xml b/pom.xml index 2bccd22f..83d0725c 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ - 8.15 + 8.16 5.6.6 3.7 1.8