Hi, SonarLint rule squid:S135 mentions that
“Restricting the number of break and continue statements in a loop is done in the interest of good structured programming.
One break AND continue statement is acceptable in a loop, since it facilitates optimal coding. If there is more than one, the code should be refactored to increase readability.”
I would like to enquire whether the rule means “not more than one break AND not more than one continue” or “not more than one break OR not more than one continue”. A simple representation of my code is as follows:
for(String a: listOfString){
if(*boolean expression*){
break;
}
if(*boolean expression*){
continue;
}
logic......
}