Skip to content

Commit

Permalink
[MSHARED-854] Adjust configuration to new Checkstyle 8.19+
Browse files Browse the repository at this point in the history
Change required for maven-checkstyle-plugin 3.1.1 to validate our projects
Remove cacheFile property from TreeWalker
  • Loading branch information
slachiewicz committed Jun 5, 2020
1 parent 7ca9b72 commit 4179d4d
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions src/main/resources/config/maven_checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,20 @@ under the License.
<property name="message" value="Line has trailing spaces."/>
</module>-->

<module name="TreeWalker">
<module name="LineLength">
<property name="max" value="120" />
<property name="ignorePattern" value="@version|@see|@todo|TODO"/>
</module>

<!-- Support CHECKSTYLE_OFF: regexp and CHECKSTYLE_ON: regexp comments to disable/enable some checks -->
<!-- see http://checkstyle.sourceforge.net/config.html#SuppressionCommentFilter -->
<module name="SuppressWithPlainTextCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE_OFF\: (.+)"/>
<property name="onCommentFormat" value="CHECKSTYLE_ON\: (.+)"/>
<property name="checkFormat" value="$1"/>
</module>

<property name="cacheFile" value="${checkstyle.cache.file}"/>
<module name="TreeWalker">

<property name="tabWidth" value="4"/>

Expand All @@ -70,7 +81,7 @@ under the License.

<!-- required for SuppressionCommentFilter -->
<!-- see http://checkstyle.sourceforge.net/config.html#SuppressionCommentFilter -->
<module name="FileContentsHolder"/>
<!-- <module name="FileContentsHolder"/> -->

<module name="LeftCurly">
<property name="option" value="nl"/>
Expand All @@ -80,11 +91,6 @@ under the License.
<property name="option" value="alone"/>
</module>

<module name="LineLength">
<property name="max" value="120" />
<property name="ignorePattern" value="@version|@see|@todo|TODO"/>
</module>

<module name="MemberName" />

<!-- Checks for Javadoc comments. -->
Expand Down Expand Up @@ -210,12 +216,4 @@ under the License.
<!-- See http://checkstyle.sourceforge.net/config_misc.html#UniqueProperties -->
<module name="UniqueProperties"/>

<!-- Support CHECKSTYLE_OFF: regexp and CHECKSTYLE_ON: regexp comments to disable/enable some checks -->
<!-- see http://checkstyle.sourceforge.net/config.html#SuppressionCommentFilter -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE_OFF\: (.+)"/>
<property name="onCommentFormat" value="CHECKSTYLE_ON\: (.+)"/>
<property name="checkFormat" value="$1"/>
</module>

</module>

0 comments on commit 4179d4d

Please sign in to comment.