View Javadoc
1   /*
2   Regexp
3   format = c-style\\s1
4   message = (default)null
5   illegalPattern = true
6   duplicateLimit = (default)0
7   errorLimit = (default)100
8   ignoreComments = (default)false
9   
10  
11  */
12  
13  package com.puppycrawl.tools.checkstyle.checks.regexp.regexp;
14  
15  public class InputRegexpTrailingComment4 {
16      int i; // don't use trailing comments :)
17      // it fine to have comment w/o any statement
18      /* good c-style comment. */
19      int j; /* bad c-style comment. */
20      void method1() { /* some c-style multi-line
21                          comment*/
22          Runnable r = (new Runnable() {
23                  public void run() {
24                  }
25              }); /* we should allow this */
26      } // we should allow this
27      /*
28        Let's check multi-line comments.
29      */
30      /* c-style */ // cpp-style
31      /* c-style 1 */ /*c-style 2 */ // violation 'Line matches the illegal pattern'
32  
33      void method2(long ms /* we should ignore this */) {
34          /* comment before text */int z;
35          /* int y */int y/**/;
36      }
37  
38      /**
39       * comment with trailing space
40       */
41      final static public String NAME="Some Name"; // NOI18N
42  }