1 /*xml
2 <module name="Checker">
3 <module name="TreeWalker">
4 <module name="TrailingComment"/>
5 </module>
6 </module>
7 */
8
9 package com.puppycrawl.tools.checkstyle.checks.trailingcomment;
10
11 // xdoc section -- start
12 public class Example1 {
13 public static void main(String[] args) {
14 int x = 10;
15 // OK
16 if (/* OK */ x > 5) {}
17 int a = 5; // violation
18 doSomething(
19 "param1"
20 ); // OK, by default such trailing of method/code-block ending is allowed
21
22 }
23
24 private static void doSomething(String param) {
25 }
26 }
27 // xdoc section -- end