Different Quality Gates for each module

Is it possible to apply QG per module instead of the complete project. For example I have 2 modules (read directories) in my project. For module A I want to have coverage > 80% on new code but in module B coverage > 50% is fine too.

Please tell me if this is possible currently? I’m using SonarQube 8.1 Enterprise.

Hello @Daniyal_Raza,

This is not possible. The Quality Gate is unique to a whole project. I would challenge why you would settle for a lower coverage on new code for some modules ?
The on new code here is important. Obviously if that would be coverage (on overall code), each module may start from a different original coverage level and expecting immediately the same coverage in QG would be unmanageable.

You may find hacks to achieve something somewhat like this but I would not even elaborate on those hacks. I think it would eventually lead you to dead ends.

1 Like