nitheeshp
(Nitheesh Poojary)
April 9, 2025, 11:23pm
1
I am using SonarQube Server and deployed through docker
I am getting this error: “Coverage on New Code 0.0% .” I was
not doing any unit tests earlier, and it is working fine. Now yesterday, a few lines of code and I’m getting this error. i am running sonarqube scanner in aws codebuild pipeline
ganncamp
(G Ann Campbell)
April 11, 2025, 4:23pm
2
Hi,
Welcome to the community!
Per the docs , Quality Gate Conditions on Coverage and Duplicated lines on new code are not calculated when there are fewer than 20 lines.
So when you were passing the Quality Gate with no tests, you hadn’t yet accumulated 20 lines. Then you crossed the threshold.
Ann
nitheeshp
(Nitheesh Poojary)
April 14, 2025, 7:17pm
3
can i reduce this lines min 1 or 2 lines
ganncamp
(G Ann Campbell)
April 15, 2025, 11:56am
4
Hi,
Sorry, this isn’t tunable. But you can turn it off, either at the project level or globally.
HTH,
Ann
ganncamp
(G Ann Campbell)
April 15, 2025, 1:01pm
6
Hi,
It’s in your project settings. Or globally under Administration.
HTH,
Ann