Why is this an issue?
If a for
loop’s condition is false before the first loop iteration, the loop will never be executed. Such loops are almost always
bugs, particularly when the initial value and stop conditions are hard-coded.
Noncompliant code example
for (int i = 10; i < 10; i++) { // Noncompliant
// ...