View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="JavadocStyle">
5       <property name="checkHtml" value="false"/>
6       </module>
7     </module>
8   </module>
9   */
10  package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocstyle;
11  
12  // xdoc section -- start
13  /**
14   * Some description here
15   */
16  public class Example5 {
17    Example5() {
18      // violation 5 lines above 'First sentence should end with a period'
19    }
20    /**
21     * Some description here.
22     */
23    private void testMethod1() {}
24    // ok below, @return tag automatically inserts a period after the text
25    /**
26     * {@return {@code true} if this object
27     * has been initialized, {@code false} otherwise}
28     */
29    private boolean testMethod2() {
30      return true;
31    }
32    /**
33     * Some description here
34     */
35    private void testMethod3() {
36      // violation 4 lines above 'First sentence should end with a period'
37    }
38    /**
39     * Some description here
40     */
41    public void testMethod4() {
42      // violation 4 lines above 'First sentence should end with a period'
43    }
44    /**
45     * Some description here
46     * Second line of description
47     */
48    private void testMethod5() {
49      // violation 5 lines above 'First sentence should end with a period'
50    }
51    /**
52     * Some description here
53     * <p
54     */
55    private void testMethod6() { // violation 4 lines above 'should end with a period'
56  
57    }
58  }
59  // xdoc section -- end