Skip to content

Commit 5780002

Browse files
Daniel Muehlbachlerromani
authored andcommitted
Issue #253: update to CS 8.27
1 parent cb5fd3f commit 5780002

File tree

7 files changed

+33
-2
lines changed

7 files changed

+33
-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.27|6.7 |7.7+|8.27|1.8
2425
4.26|6.7 |7.7+|8.26|1.8
2526
4.25|6.7 |7.7+|8.25|1.8
2627
4.24|6.7 |7.7+|8.24|1.8

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
</ciManagement>
9191

9292
<properties>
93-
<checkstyle.version>8.26</checkstyle.version>
93+
<checkstyle.version>8.27</checkstyle.version>
9494
<sonar.version>6.7</sonar.version>
9595
<sonar-java.version>5.12.0.17701</sonar-java.version>
9696
<maven.checkstyle.plugin.version>2.17</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
@@ -1102,6 +1102,19 @@
11021102
<txt>min</txt>
11031103
</prop>
11041104
</chc>
1105+
<chc>
1106+
<rule-repo>checkstyle</rule-repo>
1107+
<rule-key>com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocContentLocationCheck</rule-key>
1108+
<prop>
1109+
<key>remediationFunction</key>
1110+
<txt>CONSTANT_ISSUE</txt>
1111+
</prop>
1112+
<prop>
1113+
<key>offset</key>
1114+
<val>30</val>
1115+
<txt>min</txt>
1116+
</prop>
1117+
</chc>
11051118
<chc>
11061119
<rule-repo>checkstyle</rule-repo>
11071120
<rule-key>com.puppycrawl.tools.checkstyle.checks.metrics.JavaNCSSCheck</rule-key>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodChec
9696
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck.param.allowUndeclaredRTE=whether to allow documented exceptions that are not declared if they are a subclass of java.lang.RuntimeException. Default is false.
9797
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck.param.allowedAnnotations=List of annotations that could allow missed documentation
9898
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck.param.validateThrows=Allows validating throws tags
99+
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocContentLocationCheck.name=Javadoc Content Location
100+
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocContentLocationCheck.param.location=Specify the policy on placement of the Javadoc content
99101
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocBlockTagLocationCheck.name=Javadoc Block Tag Location
100102
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocBlockTagLocationCheck.param.tags=Specify the javadoc tags to process.
101103
rule.checkstyle.com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck.name=Javadoc Method
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<p>
2+
Checks that the Javadoc content begins from the same position
3+
for all Javadoc comments in the project. Any leading asterisks and spaces
4+
are not counted as the beginning of the content and are therefore ignored.
5+
</p>

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,16 @@
900900
</param>
901901
</rule>
902902

903+
<rule key="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocContentLocationCheck">
904+
<priority>MAJOR</priority>
905+
<name><![CDATA[Javadoc Content Location]]></name>
906+
<tag>comment</tag>
907+
<configKey><![CDATA[Checker/TreeWalker/JavadocContentLocation]]></configKey>
908+
<param key="location" type="s[first_line,second_line]">
909+
<defaultValue>second_line</defaultValue>
910+
</param>
911+
</rule>
912+
903913
<rule key="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocStyleCheck">
904914
<priority>MAJOR</priority>
905915
<name><![CDATA[Javadoc Style]]></name>

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(166);
64+
assertThat(rules).hasSize(167);
6565

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

0 commit comments

Comments
 (0)