View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="SummaryJavadoc"/>
5     </module>
6   </module>
7   */
8   package com.puppycrawl.tools.checkstyle.checks.javadoc.summaryjavadoc;
9   
10  // xdoc section -- start
11  class Example1 {
12  
13    /**
14     * {@inheritDoc}
15     */
16    public String m1(){ return ""; }
17    // violation below, 'Summary javadoc is missing'
18    /** */
19    public String m2(){ return ""; }
20  
21    /**
22     * {@summary  }
23     */
24    public String m3(){ return ""; }
25    // violation 3 lines above 'Summary javadoc is missing'
26    /**
27     * {@summary <p> <p/>}
28     */
29    public String m4() { return ""; }
30    // violation 3 lines above 'Summary javadoc is missing'
31    /**
32     * {@summary <p>This is a javadoc with period.<p/>}
33     */
34    public void m5() {}
35  
36    /**
37     * This method returns nothing.
38     */
39    void m6() {}
40  
41    /**
42    * {@summary This is a java doc with period symbol。}
43    */
44    public void m7() {}
45    // violation 3 lines above 'Summary of Javadoc is missing an ending period'
46    /**
47    * {@summary First sentence is normally the summary.
48    * Use of html tags:
49    * <ul>
50    * <li>Item one.</li>
51    * <li>Item two.</li>
52    * </ul>}
53    */
54    public void m8() {}
55  
56  }
57  // xdoc section -- end