Skip to content

Commit 11d8c26

Browse files
committed
Add checksytle suppression via comments
1 parent 7d7d91f commit 11d8c26

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

checkstyle.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,14 @@
220220
<property name="optional" value="true"/>
221221
</module>
222222

223+
<!-- Suppress filters via comments -->
224+
<!-- https://stackoverflow.com/a/4023351/9767089 -->
225+
<module name="SuppressionCommentFilter">
226+
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
227+
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
228+
<property name="checkFormat" value="$1"/>
229+
</module>
230+
223231
</module>
224232

225233
</module>

0 commit comments

Comments
 (0)