We are using sonarcloud and configured Quality Gate with 80% coverage required to pass PullRequest check.
However, randomly some of our pull requested have green “Passed” status even if they have 0% coverage.
Project has correct Quality Gate attached
Pipeline is configured and we can see correct coverage.
How many new “Lines to Cover” are reported on your pull request dashboard in SonarCloud? I wonder if you’re running into the scenario where there are too few new lines to trigger the Quality Gate condition.
Thanks, you are right, I’ve checked such strange PRs, they are not so big.
However, we try to deliver code with small PRs, and such condition is not suitable for our team, because 50+% of PR < 20 lines
Is it possible to disable such condition or reduce line amount for it on SonarCloud or pipeline side?
We use java + maven plugin to integrate
This is not configurable at the moment, although a feature was launched in SonarQube at some point in the last few years to turn it off altogether. I’ve passed your feedback along, however, and there’s a ticket in the backlog to provide some more visibility around Quality Gate conditions that aren’t triggered due to the size of the changeset.
It’s been half a year, can you please provide some feedback? Basically, is this something that you plan to enable us to configure on our side or not? For my org, this is going against best practices and we would like the chance to configure it. Otherwise, it almost makes SonarCloud useless.
At the very least, make this a rule that can be deactivated. SonarCloud should not be opinionated.