Under Quality Gates in SonarQube we have a Metric under Conditions called New Issues. This metric seems to be replaced by Issues in SonarCloud. Is there a way to get this option back in SonarCloud?
Can we define how SonarCloud flags new code?
Yes! Checkout the Administration > New Code settings at the Organization or Project level.
The question is more around how does Sonar qualify code as “New Code” our experience with SonarQube has been that it is not just new lines of code… we would have “old” issues re-introduced as now being Issues on New Code when any code in a give class file or method may have changed, even though the lines of code for the issue itself hadn’t been changed… That made the “New Issue” option work for us… It may not work for “Issues” on “New Code” when the detection of “New Code” is not just on new lines of code.
My point is, “New Issues” and “Issues” on new code behave in two very different ways, and wondering why we lost the ability to only flag “New Issues”