Skip to content

Commit 3f86ea6

Browse files
authored
Upgrade Checkstyle to 10.14.0 (#463)
Upgrades Checkstyle from 10.6.0 to 10.14.0. For release notes, see: https://checkstyle.sourceforge.io/releasenotes.html Signed-off-by: Wouter Born <github@maindrain.net>
1 parent 3b50d1b commit 3f86ea6

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

custom-checks/checkstyle/src/main/java/org/openhab/tools/analysis/checkstyle/JavadocMethodStyleCheck.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import com.puppycrawl.tools.checkstyle.api.FileContents;
2525
import com.puppycrawl.tools.checkstyle.api.TextBlock;
2626
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
27-
import com.puppycrawl.tools.checkstyle.utils.CheckUtil;
27+
import com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck;
2828
import com.puppycrawl.tools.checkstyle.utils.CommonUtil;
2929

3030
/**
@@ -123,8 +123,8 @@ public int[] getRequiredTokens() {
123123

124124
@Override
125125
public void visitToken(DetailAST ast) {
126-
boolean skipCheck = (CheckUtil.isSetterMethod(ast) || CheckUtil.isGetterMethod(ast))
127-
&& allowMissingPropertyJavadoc;
126+
boolean skipCheck = (MissingJavadocMethodCheck.isSetterMethod(ast)
127+
|| MissingJavadocMethodCheck.isGetterMethod(ast)) && allowMissingPropertyJavadoc;
128128
if (!skipCheck) {
129129
visit(ast);
130130
}

docs/maven-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Parameters:
101101
| ------ | ------| -------- |
102102
| **checkstyleRuleset** | String | Relative path of the XML configuration to use. If not set the default ruleset file will be used |
103103
| **checkstyleFilter** | String | Relative path of the suppressions XML file to use. If not set the default filter file will be used |
104-
| **maven.checkstyle.version** | String | The version of the maven-checkstyle-plugin that will be used (default value is **3.1.2**)|
104+
| **maven.checkstyle.version** | String | The version of the maven-checkstyle-plugin that will be used (default value is **3.3.1**)|
105105
| **checkstylePlugins** | List<Dependency> | A list with artifacts that contain additional checks for Checkstyle |
106106
| **checkstyleProperties** | String | Relative path of the properties file to use in the ruleset to configure specific checks |
107107

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<mockito.version>4.10.0</mockito.version>
6969
<maven.resources.version>3.3.0</maven.resources.version>
7070
<pmd.version>6.53.0</pmd.version>
71-
<checkstyle.version>10.6.0</checkstyle.version>
71+
<checkstyle.version>10.14.0</checkstyle.version>
7272
<spotbugs.version>4.8.3</spotbugs.version>
7373
<maven.core.version>3.6.0</maven.core.version>
7474
<maven.plugin.api.version>3.8.5</maven.plugin.api.version>

sat-plugin/src/main/java/org/openhab/tools/analysis/tools/CheckstyleChecker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class CheckstyleChecker extends AbstractChecker {
5353
/**
5454
* The version of the maven-checkstyle-plugin that will be used
5555
*/
56-
@Parameter(property = "maven.checkstyle.version", defaultValue = "3.2.1")
56+
@Parameter(property = "maven.checkstyle.version", defaultValue = "3.3.1")
5757
private String checkstyleMavenVersion;
5858

5959
/**
@@ -118,7 +118,7 @@ public void execute() throws MojoExecutionException {
118118

119119
checkstylePlugins.add(dependency("org.openhab.tools.sat.custom-checks", "checkstyle", plugin.getVersion()));
120120
// Maven may load an older version, if no version is specified
121-
checkstylePlugins.add(dependency("com.puppycrawl.tools", "checkstyle", "10.6.0"));
121+
checkstylePlugins.add(dependency("com.puppycrawl.tools", "checkstyle", "10.14.0"));
122122
checkstylePlugins.forEach(logDependency());
123123

124124
String baseDir = mavenProject.getBasedir().toString();

0 commit comments

Comments
 (0)