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