1 /*
2 RegexpSinglelineJava
3 format = don't use trailing comments
4 message = (default)(null)
5 ignoreCase = (default)false
6 minimum = (default)0
7 maximum = (default)0
8 ignoreComments = true
9
10
11 */
12
13 package com.puppycrawl.tools.checkstyle.checks.regexp.regexpsinglelinejava;
14
15 public class InputRegexpSinglelineJavaTrailingComment {
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 */
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 }