Skip to content

Commit

Permalink
[misc] Bump checkstyle version to 8.29
Browse files Browse the repository at this point in the history
Also bumps checkstyle-maven-plugin version to 3.1.1
  • Loading branch information
Alexander Preuß committed Oct 20, 2022
1 parent f4832c1 commit 2d3a283
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 40 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@

<!-- build plugin dependencies -->
<license.plugin.version>3.0</license.plugin.version>
<maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
<maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
<nifi.nar.plugin.version>1.2.0</nifi.nar.plugin.version>
<puppycrawl.checkstyle.version>6.19</puppycrawl.checkstyle.version>
<puppycrawl.checkstyle.version>8.29</puppycrawl.checkstyle.version>
<spotbugs-maven-plugin.version>3.1.8</spotbugs-maven-plugin.version>
</properties>

Expand Down
59 changes: 23 additions & 36 deletions src/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ page at http://checkstyle.sourceforge.net/config.html -->
<!-- Checks that there are no tab characters in the file. -->
</module>

<module name="LineLength">
<!-- Checks if a line is too long. -->
<property name="max" value="120"/>
<property name="severity" value="error"/>

<!--
The default ignore pattern exempts the following elements:
- import statements
- long URLs inside comments
-->

<property name="ignorePattern"
value="^(package .*;\s*)|(import .*;\s*)|( *\* .*https?://.*)$"/>
</module>

<module name="RegexpSingleline">
<!-- Checks that TODOs don't have stuff in parenthesis, e.g., username. -->
<property name="format" value="((//.*)|(\*.*))TODO\(" />
Expand All @@ -57,16 +72,6 @@ page at http://checkstyle.sourceforge.net/config.html -->
<property name="fileNamePattern" value=".*Tests\.java$" />
</module>

<!-- Allow use of comment to suppress javadocstyle -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>
<module name="SuppressionFilter">
<property name="file" value="${checkstyle.suppressions.file}" default="suppressions.xml" />
</module>

<!-- Check that every module has a package-info.java -->
<module name="JavadocPackage"/>

Expand Down Expand Up @@ -145,22 +150,22 @@ page at http://checkstyle.sourceforge.net/config.html -->
-->

<!-- Allow use of comment to suppress javadocstyle -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>

<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod">
<property name="scope" value="protected"/>
<property name="severity" value="error"/>
<property name="allowMissingJavadoc" value="true"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
<property name="allowUndeclaredRTE" value="true"/>
</module>

<!-- Check that paragraph tags are used correctly in Javadoc. -->
<module name="JavadocParagraph"/>

<module name="JavadocType">
<property name="scope" value="protected"/>
<property name="severity" value="error"/>
Expand Down Expand Up @@ -279,25 +284,10 @@ page at http://checkstyle.sourceforge.net/config.html -->

<!--
LENGTH and CODING CHECKS
CODING CHECKS
-->

<module name="LineLength">
<!-- Checks if a line is too long. -->
<property name="max" value="120"/>
<property name="severity" value="error"/>

<!--
The default ignore pattern exempts the following elements:
- import statements
- long URLs inside comments
-->

<property name="ignorePattern"
value="^(package .*;\s*)|(import .*;\s*)|( *\* .*https?://.*)$"/>
</module>

<module name="LeftCurly">
<!-- Checks for placement of the left curly brace ('{'). -->
<property name="severity" value="error"/>
Expand Down Expand Up @@ -438,8 +428,5 @@ page at http://checkstyle.sourceforge.net/config.html -->
<property name="severity" value="error"/>
</module>

<!-- Required to support SuppressWarningsComment -->
<module name="FileContentsHolder"/>

</module>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;

import com.fasterxml.jackson.core.JsonProcessingException;
import java.io.IOException;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;

import java.util.HashMap;
import java.util.Map;
import org.apache.pulsar.io.core.SourceContext;
Expand Down

0 comments on commit 2d3a283

Please sign in to comment.