blob: ec6b9f486f0a14a17669cba164a3270d948d27a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
////////////////////////////////////////////////////////////////////////////////
// Test case file for checkstyle.
// Created: Feb-2001
// Ignore error
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.checks.naming.localvariablename;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
class InputLocalVariableNameOneCharInitVarName
{
public void fooMethod()
{
for(int i = 1; i <10; i++) {
//come code
}
int i = 0;
for(int index = 1; index < 10; index++) {
//come code
}
for(int Index = 1; Index < 10; Index++) {
//come code
}
int index = 1;
for(; index < 10; index++) {
//come code
}
for(; i < 12; i++) {
//come code
}
Map<String, String> map = new HashMap<String, String>();
for (Map.Entry<String, String> e : map.entrySet()) {
//some code
}
}
}
|