All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.javascript.rules.javascript.S1994.html Maven / Gradle / Ivy

There is a newer version: 2.5
Show newest version

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