View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="SuppressWithNearbyCommentFilter">
5         <property name="commentFormat"
6             value="CHECKSTYLE IGNORE (\w+) FOR NEXT (\d+) LINES"/>
7         <property name="checkFormat" value="$1"/>
8         <property name="influenceFormat" value="$2"/>
9       </module>
10      <module name="ConstantName"/>
11    </module>
12  </module>
13  */
14  package com.puppycrawl.tools.checkstyle.filters.suppresswithnearbycommentfilter;
15  // xdoc section -- start
16  public class Example4 {
17    // CHECKSTYLE IGNORE ConstantNameCheck FOR NEXT 8 LINES
18    // filtered violation below 'must match pattern'
19    static final int lowerCaseConstant1 = 1;
20    // filtered violation below 'must match pattern'
21    static final int lowerCaseConstant2 = 2;
22    // filtered violation below 'must match pattern'
23    static final int lowerCaseConstant3 = 3;
24    // filtered violation below 'must match pattern'
25    static final int lowerCaseConstant4 = 4;
26    static final int lowerCaseConstant5 = 5; // violation 'must match pattern'
27  }
28  // xdoc section -- end