View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="CommentsIndentation"/>
5     </module>
6   </module>
7   */
8   package com.puppycrawl.tools.checkstyle.checks.indentation.commentsindentation;
9   
10  // xdoc section -- start
11  public class Example7 {
12    void testMethod() {
13      String s1 = "Clean code!";
14      s1.toString().toString().toString();
15      // single-line
16      // block
17      // comment (it is OK)
18      int a = 5;
19  
20      String s2 = "Code complete!";
21      s1.toString().toString().toString();
22                // It is not okay1
23           //It is not okay2
24         //It is not okay3
25      int b = 18;
26      // violation 4 lines above 'Comment has incorrect indentation level 14'
27      // violation 4 lines above 'Comment has incorrect indentation level 9'
28      // violation 4 lines above 'Comment has incorrect indentation level 7'
29    }
30  }
31  // xdoc section -- end