Need to know about customized Quality gate

Hi Team,

We are using Sonar community edition 9.4.

We need to set the code coverage condition on sonarQube Quality gate.

Condition: Either overall code coverage or New code coverage is having 80% , the project should pass.

Is it possible set “or” condition in Qulaity gate.

Overall code coverage is 84%
New code coverage is 60%

I set for coverage value for both overall & New code is set as 80 in Qulaity gate.

Is it possible to build the project as pass status for the above example. If Yes, how we can configure?



It’s not possible to or conditions together. We suggest you simply enforce a rigorous Coverage on New Code standard. Do that, and eventually, overall coverage will improve organically.


Thanks for updates Ann