1 /*xml 2 <module name="Checker"> 3 <module name="RegexpSingleline"> 4 <property name="format" value="example"/> 5 </module> 6 <module name="SuppressionSingleFilter"> 7 <property name="files" value="Example3.java"/> 8 <property name="checks" value="RegexpSinglelineCheck"/> 9 </module> 10 </module> 11 */ 12 package com.puppycrawl.tools.checkstyle.filters.suppressionsinglefilter; 13 // filtered violation 10 lines above 'Line matches the illegal pattern' 14 // xdoc section -- start 15 public class Example3 { 16 17 public void printExample() { 18 System.out.println( 19 "example" // filtered violation 'Line matches the illegal pattern 'example'' 20 ); 21 } 22 23 public void noViolation() { 24 System.out.println( 25 "RegexpSingleline is case sensitive by default. 'Example' in not matching." 26 ); 27 } 28 29 } 30 // xdoc section -- end