File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/checkstyle/checks/coding Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ class UnusedLocalVarCheck extends Check {
9090 return FOUND_GO_DEEPER ;
9191 }
9292
93- // '${name.doSomething()} or ${doSomething(name)}
94- format = " \\ $\\ {(|.*[^_0-9a-zA-Z])" + name + " ([^_0-9a-zA-Z].*)\\ }" ;
93+ // '${name.doSomething()} or ${doSomething(name)} or ${name}
94+ format = " \\ $\\ {(|.*[^_0-9a-zA-Z])" + name + " ([^_0-9a-zA-Z].*| )\\ }" ;
9595 r = new EReg (format , " " );
9696 if (r .match (s )) {
9797 return FOUND_GO_DEEPER ;
Original file line number Diff line number Diff line change @@ -65,10 +65,12 @@ abstract UnusedLocalVarCheckTests(String) to String {
6565 var index:Int;
6666 var index2:Array<Int>;
6767 var index3:String;
68+ var index4:String;
6869
6970 trace ('$index');
7071 trace ('${index2.toString()}');
7172 trace ('${Std.parseInt(index3)}');
73+ trace ('${index4}');
7274 }
7375 }" ;
7476
@@ -81,6 +83,7 @@ abstract UnusedLocalVarCheckTests(String) to String {
8183 trace ('$index2');
8284 trace ('${index2.toString()}');
8385 trace ('${Std.parseInt(index3)}');
86+ trace ('${index4}');
8487 }
8588 }" ;
8689}
You can’t perform that action at this time.
0 commit comments