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=
7         "com.puppycrawl.tools.checkstyle.checks.sizes.ParameterNumberCheck=paramnum"/>
8     </module>
9     </module>
10    <module name="SuppressWarningsFilter"/>
11  </module>
12  */
13  
14  package com.puppycrawl.tools.checkstyle.checks.annotation.suppresswarningsholder;
15  
16  // xdoc section -- start
17  class Example2 {
18    // violation below, 'More than 7 parameters (found 8)'
19    public void needsLotsOfParameters (int a,
20      int b, int c, int d, int e, int f, int g, int h) {
21      // ...
22    }
23  
24    @SuppressWarnings("paramnum")
25    public void needsLotsOfParameters1 (int a, // violation suppressed
26      int b, int c, int d, int e, int f, int g, int h) {
27      // ...
28    }
29  
30  }
31  // xdoc section -- end