Hi,
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.
Hi,
Are there plans to address this issue?
Its a real pain point for us adopting SonarCloud as we follow the release small release often methodology and small PRs need to be checked.
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.
We are getting close to a year of our code quality going down.
By now all the developers figured out to keep their commits small - the only good thing - and your horrible idea to punch a hole in code quality gates.
How hard is it to make a single parameter? Surely it can’t justify having a “feature” that invalidates most of your business proposition - code quality.
Just hopping on the bandwagon to let the team know this is important to us as well.
It does seem inline with the principles that SonarCloud supports in its ethos.
Thank you for your consideration!
It would be really nice if the quality gate could block PRs where the coverage doesn’t reach the threshold also for when there are just a few lines modified.