Skip to content

Commit

Permalink
Issue #213: update to CS 8.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Muehlbachler committed Apr 30, 2019
1 parent ffe9a56 commit 388ed37
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Compatibility matrix from checkstyle team:

Checkstyle Plugin|Sonar min|Sonar max|Checkstyle|Jdk
-----------------|---------|---------|----------|---
4.20|6.7 |7.7+|8.20|1.8
4.19|6.7 |7.7+|8.19|1.8
4.18|6.7 |7.7+|8.18|1.8
4.17|6.7 |7.5|8.17|1.8
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</ciManagement>

<properties>
<checkstyle.version>8.19</checkstyle.version>
<checkstyle.version>8.20</checkstyle.version>
<sonar.version>6.7</sonar.version>
<sonar-java.version>5.12.0.17701</sonar-java.version>
<maven.checkstyle.plugin.version>2.17</maven.checkstyle.plugin.version>
Expand Down
13 changes: 13 additions & 0 deletions src/main/resources/com/sonar/sqale/checkstyle-model.xml
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,19 @@
<txt>min</txt>
</prop>
</chc>
<chc>
<rule-repo>checkstyle</rule-repo>
<rule-key>com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck</rule-key>
<prop>
<key>remediationFunction</key>
<txt>CONSTANT_ISSUE</txt>
</prop>
<prop>
<key>offset</key>
<val>10</val>
<txt>min</txt>
</prop>
</chc>
<chc>
<rule-repo>checkstyle</rule-repo>
<rule-key>com.puppycrawl.tools.checkstyle.checks.design.FinalClassCheck</rule-key>
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/org/sonar/l10n/checkstyle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCh
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck.param.scope=visibility scope where Javadoc comments are checked
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck.param.ignoreNamePattern=regexp to define variable names to ignore
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck.param.tokens=tokens to check
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck.name=Missing Javadoc Type
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck.param.excludeScope=visibility scope where Javadoc comments are not checked
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck.param.scope=visibility scope where Javadoc comments are checked
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck.param.skipAnnotations=specify the list of annotations that allow missed documentation. Only short names are allowed, e.g. Generated
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck.param.tokens=tokens to check
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.IllegalInstantiationCheck.name=Illegal Instantiation
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.IllegalInstantiationCheck.param.classes=classes that should not be instantiated
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.IllegalInstantiationCheck.param.tokens=tokens to check
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Checks for missing Javadoc comments for class, enum, interface, and annotation interface definitions. The scope to verify is specified using the Scope class and defaults to Scope.PUBLIC. To verify another scope, set property scope to one of the Scope constants.
18 changes: 18 additions & 0 deletions src/main/resources/org/sonar/plugins/checkstyle/rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,24 @@
<status>READY</status>
</rule>

<rule key="com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck">
<priority>MAJOR</priority>
<name><![CDATA[Missing Javadoc Type]]></name>
<configKey><![CDATA[Checker/TreeWalker/MissingJavadocType]]></configKey>
<cardinality>MULTIPLE</cardinality>
<param key="scope" type="s[nothing,public,protected,package,private,anoninner]">
<defaultValue>public</defaultValue>
</param>
<param key="excludeScope" type="s[nothing,public,protected,package,private,anoninner]">
</param>
<param key="skipAnnotations" type="s{}">
</param>
<param key="tokens" type="s[INTERFACE_DEF,CLASS_DEF,ENUM_DEF,ANNOTATION_DEF]">
<defaultValue>INTERFACE_DEF,CLASS_DEF,ENUM_DEF,ANNOTATION_DEF</defaultValue>
</param>
<status>READY</status>
</rule>

<rule key="com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck">
<priority>MINOR</priority>
<name><![CDATA[Left Curly]]></name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void test() {
assertThat(repository.language()).isEqualTo("java");

final List<RulesDefinition.Rule> rules = repository.rules();
assertThat(rules).hasSize(157);
assertThat(rules).hasSize(158);

for (RulesDefinition.Rule rule : rules) {
assertThat(rule.key()).isNotNull();
Expand Down

0 comments on commit 388ed37

Please sign in to comment.