When running sonar analysis against a pull request, any new issues that are discovered by Sonar cause the analysis to fail. Some of the issues are not specified as problems in our quality gates for the project. Is there a way to specify a specific quality gate configuration for PR analysis so certain things, like code smells, aren’t listed as errors?
Hi,
No not yet. Right now we have a hard-coded gate in place based on the count of Open issues. That means you can mark the issues raised on a PR Confirmed/False Positive/Won’t Fix through the SonarQube interface to make your PR pass. That probably doesn’t retroactively change the status of your build, but the next run should succeed (assuming new issues haven’t been introduced).
Why don’t we allow you to set a full-fledged QG for PRs? Well, we’re not there yet. Through 7.3 we only have issue counts on PRs. 7.4 (E.T.A next week) adds coverage ( ), and 7.5 should add duplications, and possibly some, as-yet-to-be-determined form of QGs (although that’s more likely to be 7.6).
Ann