View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="JavadocMethod"/>
5       <module name="EqualsAvoidNull"/>
6     </module>
7     <module name="SuppressionSingleFilter">
8       <property name="files" value="Example2.java"/>
9       <property name="checks" value="JavadocMethod|EqualsAvoidNull"/>
10    </module>
11  </module>
12  */
13  package com.puppycrawl.tools.checkstyle.filters.suppressionsinglefilter;
14  // xdoc section -- start
15  public class Example2 {
16  
17    public void checkStringEquality(String s) {
18      // filtered violation below 'String literal expressions should be on the left'
19      s.equals("M");
20    }
21    /**
22     * @param p1 The first number
23     */
24    // filtered violation below '@return tag should be present'
25    private int m2(int p1) { return p1; }
26  }
27  // xdoc section -- end