I am evaluating SonarQube Cloud as a Code Quality tool in my current organisation. One of the core requirements we have is to fail PR checks if it has coverage less than 80%.
I have created a public project to check this. I have observed that the Sonar Quality Gate is passing even when the coverage is less than 80%. Sonar is correctly detecting the coverage is less than 80 under “New Issues” but quality gate is not failing.
Here is the comment Sonar has posted in the PR. It clearly says coverage is 11% but “Sonar Code Analysis” is passing.
Just to isolate the issue from the PR decoration, does your project dashboard (what you see when you click on “see analysis details on SonarQube Cloud” show 11.8% coverage and a passing quality gate?