org.sonar.l10n.javascript.rules.javascript.S1994.html Maven / Gradle / Ivy
It is almost always an error when a for
loop's stop condition and incrementer don't act on the same variable. Even when it is not, it could confuse future maintainers of the code, and should be avoided.
Noncompliant Code Example
for (i = 0; i < 10; j++) { // Noncompliant
// ...
}
Compliant Solution
for (i = 0; i < 10; i++) {
// ...
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy