From SonarQube version 6.7 it is no longer possible to manually change built in quality gates. Therefore we suggest you make your own copy of the Blueriq qualQuality Gate Installer Guidelinesity gate.
A quality gate is the best way to enforce a quality policy in your organization. Quality gates are an integral part of working with SonarQube. They are there to answer the most important question in software development: can I deliver my project to production?
In order to answer this question, a set of conditions is defined based on measure thresholds against which projects are measured. For example:
- No new blocker issues
- Code coverage on new code greater than 80%
- Etc.
Ideally, all projects will be verified against the same quality gate, but that's not always practical. For instance, you may find that:
- Technological implementation differs from one application to another (legacy projects might have different standards).
- You want to ensure stronger requirements on some of your applications (libraries distributed over all your projects might require more strict gates).
- Etc.
Which is why you can define as many quality gates as you wish. Quality Gates are defined and managed in the Quality Gates page found in the top menu of Sonarqube.
Thanks to the SonarQube notification mechanism, users can be notified when a quality gate fails. How to set up notifications for failing quality gates can be found on the Notifying users of Quality Gate failure page.
Blueriq Quality Gate
To make setting up quality gates more user friendly we introduced a Blueriq Quality Gate This gate can be extended and changed to suit the requirements of your project or projects. How to use the installer is documented on the Quality Gate Installer Guidelines page.
Default Metrics
The default metrics of the Blueriq quality gate can be found in the table below:
Name | Operator | Warning Value | Error Value |
---|---|---|---|
Number of Modules in Project | GT | 20 | 40 |
Number of Reusable Expressions | GT | 50 | 100 |
Number of Complex Expressions | GT | 10 | 50 |
Code Smells | GT | 30 | 100 |