Skip to content

Commit

Permalink
PHOENIX-5428 Upgrade maven-checkstyle-plugin version
Browse files Browse the repository at this point in the history
This upgrades maven-checkstyle-plugin to 3.1.0 and
updates the checker.xml config files to work with recent
checkstyle versions

Closes #565

Signed-off-by: Josh Elser <elserj@apache.org>
  • Loading branch information
stoty authored and joshelser committed Sep 4, 2019
1 parent df3cc54 commit 0012816
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 47 deletions.
39 changes: 16 additions & 23 deletions phoenix-tracing-webapp/src/main/config/checkstyle/checker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ limitations under the License.
<module name="FileTabCharacter"/>

<module name="TreeWalker">
<property name="cacheFile" value="target/checkstyle-cachefile"/>

<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
Expand Down Expand Up @@ -90,10 +89,6 @@ limitations under the License.
</module>
<!-- Switch statements should be complete and with independent cases -->
<module name="FallThrough"/>
<!-- For hadoop_yarn profile, some YARN exceptions aren't loading in checkstyle -->
<module name="RedundantThrows">
<property name="suppressLoadErrors" value="true" />
</module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<!-- Only one statement per line allowed -->
Expand Down Expand Up @@ -256,26 +251,24 @@ limitations under the License.
<!-- No extra whitespace around types -->
<module name="GenericWhitespace"/>

<!-- Required for SuppressionCommentFilter below -->
<module name="FileContentsHolder"/>
</module>
<!-- Setup special comments to suppress specific checks from source files -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>

<!-- Setup special comments to suppress specific checks from source files -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>
<!-- Turn off all checks between OFF and ON -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: OFF"/>
<property name="onCommentFormat" value="CHECKSTYLE\: ON"/>
</module>

<!-- Turn off all checks between OFF and ON -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: OFF"/>
<property name="onCommentFormat" value="CHECKSTYLE\: ON"/>
<!-- Turn off checks for the next N lines. -->
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="CHECKSTYLE: +IGNORE (\d+)"/>
<property name="influenceFormat" value="$1"/>
</module>
</module>

<!-- Turn off checks for the next N lines. -->
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="CHECKSTYLE: +IGNORE (\d+)"/>
<property name="influenceFormat" value="$1"/>
</module>
</module>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.13</version>
<version>3.1.0</version>
<executions>
<execution>
<id>validate</id>
Expand Down
39 changes: 16 additions & 23 deletions src/main/config/checkstyle/checker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ limitations under the License.
<module name="FileTabCharacter"/>

<module name="TreeWalker">
<property name="cacheFile" value="target/checkstyle-cachefile"/>

<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
Expand Down Expand Up @@ -90,10 +89,6 @@ limitations under the License.
</module>
<!-- Switch statements should be complete and with independent cases -->
<module name="FallThrough"/>
<!-- For hadoop_yarn profile, some YARN exceptions aren't loading in checkstyle -->
<module name="RedundantThrows">
<property name="suppressLoadErrors" value="true" />
</module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<!-- Only one statement per line allowed -->
Expand Down Expand Up @@ -256,26 +251,24 @@ limitations under the License.
<!-- No extra whitespace around types -->
<module name="GenericWhitespace"/>

<!-- Required for SuppressionCommentFilter below -->
<module name="FileContentsHolder"/>
</module>
<!-- Setup special comments to suppress specific checks from source files -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>

<!-- Setup special comments to suppress specific checks from source files -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>
<!-- Turn off all checks between OFF and ON -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: OFF"/>
<property name="onCommentFormat" value="CHECKSTYLE\: ON"/>
</module>

<!-- Turn off all checks between OFF and ON -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: OFF"/>
<property name="onCommentFormat" value="CHECKSTYLE\: ON"/>
<!-- Turn off checks for the next N lines. -->
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="CHECKSTYLE: +IGNORE (\d+)"/>
<property name="influenceFormat" value="$1"/>
</module>
</module>

<!-- Turn off checks for the next N lines. -->
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="CHECKSTYLE: +IGNORE (\d+)"/>
<property name="influenceFormat" value="$1"/>
</module>
</module>

0 comments on commit 0012816

Please sign in to comment.