
org.sonar.l10n.pmd.rules.pmd.JumbledIncrementer.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-pmd-plugin Show documentation
Show all versions of sonar-pmd-plugin Show documentation
PMD is a tool that looks for potential problems like possible bugs, dead code, suboptimal code, overcomplicated expressions or duplicate code.
The newest version!
Avoid jumbled loop incrementers - it's usually a mistake, and it's confusing even if it's what's intended.
Example :
public class JumbledIncrementerRule1 {
public void foo() {
for (int i = 0; i < 10; i++) {
for (int k = 0; k < 20; i++) {
System.out.println("Hello");
}
}
}
}
This rule is deprecated, use {rule:squid:ForLoopCounterChangedCheck} instead.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy