Added inspection based on RemoveForLoopIndicesIntention
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection reports for loops iterating over a collection of values using "withIndex()" function with index variable not used in the loop body.
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +1,3 @@
|
||||
for ((i, x) in foo.withIndices()) {
|
||||
for (<spot>(i, x) in foo.withIndices()</spot>) {
|
||||
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
for (x in foo) {
|
||||
for (<spot>x in foo</spot>) {
|
||||
|
||||
}
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
for (x in foo) {
|
||||
for (<spot>x in foo</spot>) {
|
||||
|
||||
}
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
for ((i, x) in foo.withIndices()) {
|
||||
for (<spot>(i, x) in foo.withIndices()</spot>) {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user