Hi Team,
The expected SonarQube bug appears not to be caught in the code below, even though it’s caught in a very similar code as seen in the screenshot. Any thoughts?
class LoopConditionBug {
public void showBug() {
boolean loopCondition = getLoopCondition();
for (int i = 0; i < 0 && loopCondition; i++) {
System.out.println("This line of code should never be executed");
}
}
private boolean getLoopCondition() {
return false;
}
}
Screenshot of code scan result
Sonarqube version 25.5
Lang: Java
SonarScanner version: 5.0.1.3006
