Quality Gate Shows Pass, Even if the boolean conditions failed


(Saurabh Sharma) #1

Recently I am setting setting up Sonarqube Community Edition Version 6.7.6 (build 38781).
When I ran the analysis on the code sonarqube analyzed many issues. But the Quality Gate shows Pass.
Please find screenshot of Quality Gate settings and Project Analysis.
sonarqube
From the screenshots we can clearly see that the conditions are not met, still the result is Pass.
What needs to be done, is there any configuration setting I am missing ?.


(G Ann Campbell) #2

Hi,

The default quality gate contains conditions that are all “on New Code”. Presumably your Bugs, Vulnerabilities, Duplications, and (lack of) Coverage are all legacy. If you want the quality gate to fail for the existence of any blocker Vulnerabilities then you’ll need to create a custom Quality Gate that include that criteria.

 
HTH,
Ann


Always getting quality gate passed
(Saurabh Sharma) #3

Thanks, it worked after the creation of custom quality gate.