1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="LocalVariableName"> 5 <property name="format" value="^[a-z](_?[a-zA-Z0-9]+)*$"/> 6 </module> 7 </module> 8 </module> 9 */ 10 11 package com.puppycrawl.tools.checkstyle.checks.naming.localvariablename; 12 13 import java.util.ArrayList; 14 import java.util.List; 15 16 // xdoc section -- start 17 class Example3 { 18 void myMethod () { 19 for(int i = 1; i < 10; i++) {} 20 for(int K = 1; K < 10; K++) {} // violation 21 List list = new ArrayList(); 22 for (Object o : list) {} 23 for (Object O : list) {} // violation 24 } 25 } 26 // xdoc section -- end 27 28