View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="ParameterNumber"/>
5       <module name="SuppressWarningsHolder">
6         <property name="aliasList" value="ParameterNumberCheck=paramnum"/>
7       </module>
8     </module>
9     <module name="SuppressWarningsFilter"/>
10  </module>
11  */
12  
13  package com.puppycrawl.tools.checkstyle.checks.annotation.suppresswarningsholder;
14  
15  // xdoc section -- start
16  public class Example3 {
17    // violation below, 'More than 7 parameters (found 8)'
18    public void needsLotsOfParameters (int a,
19      int b, int c, int d, int e, int f, int g, int h) {
20      // ...
21    }
22  
23    @SuppressWarnings("paramnum")
24    public void needsLotsOfParameters1 (int a, // violation suppressed
25      int b, int c, int d, int e, int f, int g, int h) {
26      // ...
27    }
28  
29  }
30  // xdoc section -- end