Hey. I’ve integrated Sonarqube with Jenkins, Bitbucket to analyse PR and it worked. Now I’m trying to add a new metrics (critical issue, blocker issue) to the quality gate.
Sonarqube DE - Version 8.5.
Sonarqube pr analysis don’t recognize new metrics in a code, only code smells. So we can’t prevent developers to merge PR if they break some critical rules.
PR analysis only applies that subset of Quality Gate conditions that relate to New Code (since there’s no “overall” code in a PR, only new code). So if your added conditions aren’t on New Code it’s expected that they won’t kick in here.
Thanks for the response.
Thing that I added conditions to the New Code (critical issues, blocker issues). Then I’m introducing a bugs to the PR (for example: while(true)). Sonarqube can’t recognize it.
Thanks for the screenshots. Your 2nd one is of a branch, rather than a PR (a PR wouldn’t have an “Overall” tab). I suppose that if you went to the SonarQube homepage of the PR you show in your 3rd screenshot, it would show a failing Quality Gate, and this is really a question of PR decoration in BitBucket and of blocking the merge…?