Skip to content

Commit 9e27ea1

Browse files
author
Daniel Muehlbachler
committed
Issue #290: update to CS 8.31
1 parent 69eb02c commit 9e27ea1

File tree

7 files changed

+30
-2
lines changed

7 files changed

+30
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Compatibility matrix from checkstyle team:
2121

2222
Checkstyle Plugin|Sonar min|Sonar max|Checkstyle|Jdk
2323
-----------------|---------|---------|----------|---
24+
4.31|7.9 |7.9+|8.31|1.8
2425
4.30|7.9 |7.9+|8.30|1.8
2526
4.29|7.9 |7.9+|8.29|1.8
2627
4.28|7.9 |7.9+|8.28|11

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
</ciManagement>
9494

9595
<properties>
96-
<checkstyle.version>8.30</checkstyle.version>
96+
<checkstyle.version>8.31</checkstyle.version>
9797
<sonar.version>7.9</sonar.version>
9898
<sonar-java.version>6.0.0.20538</sonar-java.version>
9999
<maven.checkstyle.plugin.version>3.1.0</maven.checkstyle.plugin.version>

src/main/resources/com/sonar/sqale/checkstyle-model.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,19 @@
13751375
<txt>min</txt>
13761376
</prop>
13771377
</chc>
1378+
<chc>
1379+
<rule-repo>checkstyle</rule-repo>
1380+
<rule-key>com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonAfterOuterTypeDeclarationCheck</rule-key>
1381+
<prop>
1382+
<key>remediationFunction</key>
1383+
<txt>CONSTANT_ISSUE</txt>
1384+
</prop>
1385+
<prop>
1386+
<key>offset</key>
1387+
<val>10</val>
1388+
<txt>min</txt>
1389+
</prop>
1390+
</chc>
13781391
<chc>
13791392
<rule-repo>checkstyle</rule-repo>
13801393
<rule-key>com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocPackageCheck</rule-key>

src/main/resources/org/sonar/l10n/checkstyle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.OverloadMethodsDec
507507
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonInEnumerationCheck.name=Unnecessary Semicolon in Enumeration
508508
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonAfterTypeMemberDeclarationCheck.name=Unnecessary Semicolon After Type Member Declaration
509509
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonAfterTypeMemberDeclarationCheck.param.tokens=tokens to check
510+
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonAfterOuterTypeDeclarationCheck.name=Unnecessary Semicolon After Outer Type Declaration
511+
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonAfterOuterTypeDeclarationCheck.param.tokens=tokens to check
510512
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonInTryWithResourcesCheck.name=Unnecessary Semicolon in Resource Declaration
511513
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonInTryWithResourcesCheck.param.allowWhenNoBraceAfterSemicolon=Allow unnecessary semicolon if closing paren is not on the same line.
512514
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.coding.VariableDeclarationUsageDistanceCheck.name=Variable Declaration Usage Distance
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
Checks if unnecessary semicolon is used after type declaration.
3+
</p>

src/main/resources/org/sonar/plugins/checkstyle/rules.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2050,6 +2050,15 @@
20502050
</param>
20512051
</rule>
20522052

2053+
<rule key="com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonAfterOuterTypeDeclarationCheck">
2054+
<name><![CDATA[Unnecessary Semicolon After Outer Type Declaration]]></name>
2055+
<priority>MAJOR</priority>
2056+
<configKey><![CDATA[Checker/TreeWalker/UnnecessarySemicolonAfterOuterTypeDeclaration]]></configKey>
2057+
<param key="tokens" type="s[CLASS_DEF,INTERFACE_DEF,ENUM_DEF,ANNOTATION_DEF]">
2058+
<defaultValue>CLASS_DEF,INTERFACE_DEF,ENUM_DEF,ANNOTATION_DEF</defaultValue>
2059+
</param>
2060+
</rule>
2061+
20532062
<rule key="com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationLocationCheck">
20542063
<name><![CDATA[Annotation Location]]></name>
20552064
<priority>MAJOR</priority>

src/test/java/org/sonar/plugins/checkstyle/CheckstyleRulesDefinitionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void test() {
6161
assertThat(repository.language()).isEqualTo("java");
6262

6363
final List<RulesDefinition.Rule> rules = repository.rules();
64-
assertThat(rules).hasSize(171);
64+
assertThat(rules).hasSize(172);
6565

6666
for (RulesDefinition.Rule rule : rules) {
6767
assertThat(rule.key()).isNotNull();

0 commit comments

Comments
 (0)