View Javadoc
1   /*
2   SuppressionCommentFilter
3   offCommentFormat = CSOFF (\\w+) \\(\\w+\\)
4   onCommentFormat = CSON (\\w+)
5   checkFormat = MemberNameCheck
6   messageFormat = (default)(null)
7   idFormat = (default)(null)
8   checkCPP = (default)true
9   checkC = (default)true
10  
11  
12  com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck
13  id = ignore
14  format = (default)^[a-z][a-zA-Z0-9]*$
15  applyToPublic = (default)true
16  applyToProtected = (default)true
17  applyToPackage = (default)true
18  applyToPrivate = (default)true
19  
20  
21  com.puppycrawl.tools.checkstyle.checks.naming.ConstantNameCheck
22  id = (null)
23  format = (default)^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$
24  applyToPublic = (default)true
25  applyToProtected = (default)true
26  applyToPackage = (default)true
27  applyToPrivate = (default)true
28  
29  
30  com.puppycrawl.tools.checkstyle.checks.coding.IllegalCatchCheck
31  illegalClassNames = (default)Error, Exception, RuntimeException, Throwable, java.lang.Error, \
32                      java.lang.Exception, java.lang.RuntimeException, java.lang.Throwable
33  
34  
35  */
36  
37  package com.puppycrawl.tools.checkstyle.filters.suppressioncommentfilter;
38  
39  public class InputSuppressionCommentFilterSuppressById {
40  
41      //CSOFF ignore (reason)
42      private int A1; // filtered violation
43  
44      // @cs-: ignore (No NPE here)
45      private static final int abc = 5; // violation
46  
47  
48      int line_length = 100; // filtered violation
49      //CSON ignore
50  
51      private long ID = 1; // violation
52  
53      // CSOFF ignore (allow DEF)
54      private int DEF = 2; // violation
55  
56      // CSOFF ignore (allow xyz)
57      private int XYZ = 3; // violation
58  }