1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="SingleSpaceSeparator"> 5 <property name="validateComments" value="true"/> 6 </module> 7 </module> 8 </module> 9 10 11 */ 12 13 package com.puppycrawl.tools.checkstyle.checks.whitespace.singlespaceseparator; 14 15 // xdoc section -- start 16 class Example2 { 17 // violation below 'Use a single space' 18 void fun1() {} // 2 whitespaces before the comment starts 19 // violation below 'Use a single space' 20 void fun2() { return; } /* 2 whitespaces before the comment starts */ 21 // violation below 'Use a single space' 22 /* 2 whitespaces after the comment ends */ int a; 23 24 String s; /* OK, 1 whitespace */ 25 26 /** 27 * This is a Javadoc comment 28 */ int b; // 2 whitespaces after the javadoc comment ends 29 // violation above 'Use a single space' 30 float f1; 31 32 /** 33 * OK, 1 white space after the doc comment ends 34 */ float f2; 35 } 36 // xdoc section -- end