We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 036c965 commit ea97917Copy full SHA for ea97917
docs/HANDLED_RULES.md
@@ -717,6 +717,17 @@ Example repair where a variable declared in a loop header is unused:
717
}
718
```
719
720
+We also perform repair for unused variables in enhanced for-loop headers:
721
+
722
+```diff
723
+- for (String input : inputList) { // noncompliant
724
++ for (int inputIterator=0; inputIterator < inputList.size(); ++inputIterator) { // compliant
725
+ doSomething();
726
+ }
727
+```
728
729
+> Note that this repair strategy is not suggested by SonarSource.
730
731
732
-----
733
0 commit comments