1 /* 2 MatchXpath 3 query = //SINGLE_LINE_COMMENT[./COMMENT_CONTENT[not(starts-with(@text, ' '))]] 4 5 */ 6 7 package com.puppycrawl.tools.checkstyle.checks.coding.matchxpath; 8 9 public class InputMatchXpathSingleLineComments { 10 void foo() { 11 int num; // Trailing comment 12 13 boolean isTrue; //Some Comment // violation 14 double pi = 3.14; //Constant PI value // violation 15 } 16 }