Default Quality Gate Isn't Functioning As Expected

Hello All!

Sorry to hit everyone up with another Quality Gate question, but I just keep running into things that I just flat out do not understand.

I have a short lived branch that gets a Pass rating on the Quality Gate, but under Code Coverage it is zero’ed out??? I’m using the default Quality Gate and don’t understand how that could get a Pass rating. The gate says if you have less than 80% coverage then it should be marked as a fail.

Hey there.

Conditions on Coverage/Duplication are not calculated when there are fewer than 20 lines (SONAR-9352). We did this because of our own experiences with “diminishing returns” situations where the cumulative change sets were small and one or two uncovered lines caused the project to fail the Quality Gate.

So a few things to note:

  • I (think) we have lost something in the UI that is supposed to tell you this when your SLB falls into this situation. Something like: “Some Quality Gate conditions on New Code were ignored because of the small number of New Lines”
  • In SonarQube, this can be disabled, it has never made its way to SonarCloud
  • I’ll flag this for attention because I agree, the experience is confusing
1 Like

Hello Colin! I wanted to say thank you very much for replying to my post and I appreciate the detailed explanation!!!

It would be great to see something implemented that addresses the confusion especially for newbs like me :slight_smile:

-Nathan

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.