Github check doesn't fail when code coverage of new code is under the quality gate

We are using sonarcloud checks for our projects on github and noticed that the code coverage (of new code) has no impact on the check although we have set the quality gate.
We wrote a code to test with 0% coverage on new code and triggered the check.
As you can see here in the pull request the check passed although our quality gate should not allow this.

According to the sonarcloud UI, everything is fine.
In the measures of the pull request it is titled as 0 % coverage on new code.

Why does the check pass then? Are we doing something wrong?


1 Like

Hi Enes,

Only open issues are taken into account to compute the quality status of a PR or a short lived branch. Your PR has no open issues, thus the Checks pass.
For now Quality Gates only apply for long-lived branches.

I understand the confusion here.
Note than we plan to improve the definition of Quality Gate for PRs and short lived branch.