Skip to content

Commit

Permalink
Issue checkstyle#11655: allow suppressing Google style warnings with …
Browse files Browse the repository at this point in the history
…annotations and comments
  • Loading branch information
ddcprg committed May 18, 2022
1 parent 74747a2 commit f22ab11
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/main/resources/google_checks.xml
Expand Up @@ -16,7 +16,10 @@
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
-->

<module name = "Checker">
<module name="Checker">
<!-- IMPORTANT: Allows use of SuppressWarnings annotation -->
<module name="SuppressWarningsFilter"/>

<property name="charset" value="UTF-8"/>

<property name="severity" value="warning"/>
Expand Down Expand Up @@ -47,6 +50,13 @@
</module>

<module name="TreeWalker">
<module name="SuppressWarningsHolder" />
<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="OuterTypeFilename"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
Expand Down Expand Up @@ -106,8 +116,7 @@
<property name="tokens"
value="COMMA, SEMI, TYPECAST, LITERAL_IF, LITERAL_ELSE, LITERAL_RETURN,
LITERAL_WHILE, LITERAL_DO, LITERAL_FOR, LITERAL_FINALLY, DO_WHILE, ELLIPSIS,
LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_CATCH, LAMBDA,
LITERAL_YIELD"/>
LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_CATCH, LAMBDA"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
Expand Down

0 comments on commit f22ab11

Please sign in to comment.