SonarCloud Quality Gate Passes with Accepted Issues

Our Quality Gate has a condition to fail on new code when the number of accepted issues is greater than zero.

One of our branches of code had an accepted issue and still passed the quality gate when the accepted issues met the failure condition.

We are curious why this passed the Quality Gate and if it has anything to do with the “snooze” icon next to the accepted issues count in the dashboard.

Thank you for any help!

Hi,

Could you share a screenshot of the Quality Gate in question, please?

 
Thx,
Ann

Yes, here is the Branch Summary and the Quality Gate that was used for the analysis.


Hi,

Thanks for those screenshots.

I was expecting (hoping) to see that your ‘Accepted Issues’ criterion was on overall code :joy:, which would explain the situation. Since it’s not, could you check one more thing: double-check in the project’s Information that the name of the ‘Quality gate used’ is the same as the name of the one you’ve screenshotted above?

 
Thx,
Ann

No problem, :joy: I wish that was the case as well…we are a little stumped on this one. I can confirm that the ‘Quality gate used’ is indeed the same name as the one in the screenshot.

Thank you,
Lucas

Hi Lucas,

Thanks for checking. I’m going to flag this for more expert eyes.

 
Ann

Thank you!

Dear @loss0527

Thank you for reporting this issue.
I noticed that switching between the tabs (Summary, Issues) doesn’t refresh the Quality Gate status (it’s a bug).
What happens when you refresh the page? Is the correct Quality Gate status shown?

Anita

The quality gate status remained the same after refreshing the page and other people looking at it in their browsers on separate machines.

Thank you

Hi,

Have you reanalyzed in the interim? On subsequent analysis, is it still the case that there’s a passing Quality Gate and an accepted issue? And if so… I don’t suppose the project is public & you could share a link?

 
Ann

Hello,

We ended up changing our Quality Gate to pass for Accepted Issues, that ended up matching the way we wanted to use Accepted Issues anyway. Because of that change, we haven’t seen the same issue on any analysis. Unfortunately, not a public project.

Thank you!

1 Like

Hi,

Thanks for the follow-up.

 
Ann