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.
Default “Sonar Way” is being used as shown in the below screenshot.
“New Code” settings is like below
Could someone please let me know what’s going wrong?