Quality Gate fails due to zero coverage on one changed line

  • SonarQube version: Developer Edition Version 8.1 (build 31237)

In previous versions, code coverage was ignored in the quality gate if the number of new lines was below 20. (Not sure when exactly this was introduced, but it was working at least in 7.8, see SONAR-12121 issue.)

With the current version 8.1, branches with zero coverage and few code lines fail the quality gate again, meaning that the previously introduced feature is not working anymore.

We use the standard settings for coverage (i.e. Coverage > 80% on new code) in our quality gate.

Will this be fixed?

1 Like

Hi,

Welcome to the community and thanks for this report!

Would you mind providing a screenshot of the front page of the branch in question?

 
Thx,
Ann

We have the same issue since today, that the coverage is 0.0% in the last builds see:


And here our, not changed, maven build with jacoco

I found the Problem. See https://jira.sonarsource.com/browse/MMF-1651 and SonarCloud java coverage suddenly zero as of today

Hi Ann,

thanks for the quick reply.
Screenshot is attached with one of the branches with the mentioned problem.

Just to clarify, I don’t think the issue reported by me is the same that @derTobsch is seeing, as we are using a C#/MsBuild/OpenCover build environment.

Regards,
Michael

Hi Michael,

Thanks for the screenshot!

This regression is probably related somehow to 8.1’s simplification of the branch model/concept. Not that that’s any consolation, I’m sure. :smiley:

I’ve raised this internally. Hopefully we’ll see a fix in 8.2.

 
Ann

Thanks again for the quick reply!

No consolation, but at least in our environment the impact is not so critical as we can easily around the merge check blocking the PR.

But anyways, I’ll be looking forward to 8.2 then :slight_smile:

Regards,
Michael