1 /*xml 2 <module name="Checker"> 3 <module name="RegexpSingleline"> 4 <property name="format" value="System.exit\("/> 5 <!-- next line not required as 0 is the default --> 6 <property name="minimum" value="0"/> 7 <property name="maximum" value="1"/> 8 </module> 9 </module> 10 */ 11 package com.puppycrawl.tools.checkstyle.checks.regexp.regexpsingleline; 12 // xdoc section -- start 13 public class Example3 { 14 void myFunction() { 15 try { 16 doSomething(); 17 System.exit(0); 18 } catch (Exception e) { 19 System.exit(1); // violation, as there are more than one occurrence. 20 } 21 } 22 23 void doSomething(){} 24 } 25 // xdoc section -- end