We are using Azure DevOps as an ALM and CI tool. And we are also using the SonarCloudPrepare@2 task as part of our analysis. The scanner mode being used is “MSBuild”.
We are seeing an issue whereby new_code_coverage is causing us issues. On our most recent analysis new_code_coverage failed because it expects 80% coverage but this was on only 2 new lines. This quote is from Sonar documentation “Conditions on Coverage and Duplicated Lines are not calculated when there are fewer than 20 lines.” ( Managing quality gates | SonarQube Cloud Documentation)
Further to this, these two lines of code were added to an existing C# file and the lines were two new variables being used elsewhere. This file already had test coverage.
I would appreciate any support we can have on this and any insight shared on new_code_coverage behavior.