Using AzureDevops for builds/current scanner/analyzer: 4.19.0
This is an issue with c# code. We currently have a “perfectly” clean project - i.e. no problems at all, no code smells, completely clean:
If I make a PR that removes let’s say a line of logging:
and because I remove that, the using statement:
is no longer required, the PR build/sonar builds fine even though all my quality gates say no code smells on either new or existing code:
but once I merge this code into our develop branch, SonarQube fails on code smells :
I believe the issue is that “New Code” is only analyzed for lines of code that were modified, but in this case those modified lines have caused an indirect break that should fail in the PR before it is merged.
I don’t have a workaround - ideally I’d make it so that every build is treated like my main “develop” branch build instead of doing any “new code” analysis at all.