View Javadoc
1   /*
2   SuppressWithNearbyCommentFilter
3   commentFormat = @cs-: (\\w+) \\(\\w+\\)
4   checkFormat = (default).*
5   messageFormat = (default)(null)
6   idFormat = $1
7   influenceFormat = (default)0
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  package com.puppycrawl.tools.checkstyle.filters.suppresswithnearbycommentfilter;
37  
38  public class InputSuppressWithNearbyCommentFilterById {
39  
40      // filtered violation below
41      private int A1; // @cs-: ignore (reason)
42  
43      // violation below
44      private static final int abc = 5; // @cs-: violation (No NPE here)
45  
46      // filtered violation below
47      int line_length = 100; // Suppression @cs-: ignore (reason)
48  
49      // violation below
50      private long ID = 1; // Suppression @cs-:
51      /*
52          Suppression @cs-: ignore (reason)*/private long ID3 = 1; // filtered violation
53  
54      // violation below
55      private int DEF = 4; // @cs-: ignore (allow DEF)
56  
57      // violation below
58      private int XYZ = 3; // @cs-: ignore (allow xyz)
59  }