Adjusting quality gates#
Adjust the quality gates to configure when Codacy reports your pull requests and commits as not up to standards.
Depending on the result of applying the quality gate rules, Codacy updates the color of the metrics on the pull request or commit quality overview and reports the corresponding pull request status on your Git provider, if enabled.
Note
Integrate Codacy with your Git workflow to report the pull request status to your Git provider and optionally block merging pull requests that aren't up to standards.
To access the quality gates, open your repository Settings, tab Gates. The following screenshot displays the default configuration values:
- New issues are over: Pull requests or commits are marked not up to standards if the number of issues introduced that have at least the specified severity level is higher than the set value.
- New security issues are over: Pull requests or commits are marked not up to standards if the number of security issues introduced is higher than the set value.
- Complexity is over: Pull requests or commits are marked not up to standards if the introduced complexity is higher than the set value.
- Duplication is over: Pull requests or commits are marked not up to standards if the number of clones introduced is higher than the set value.
-
Coverage variation is under: Pull requests or commits are marked not up to standards if they introduce a variation to coverage lower than the set value.
Tip
Set this gate to -0.10% or lower. This will ensure that developers have a coverage drop margin so they aren't blocked while performing some types of code refactors
To ensure that the changes in each pull request have a minimum level of coverage, use the gate Diff coverage is under instead.
-
Diff coverage is under: Pull requests are marked not up to standards if the diff coverage of the pull request is lower than the set value or
∅
(not applicable). This rule is only available for pull requests.
See also#
- Which metrics does Codacy calculate?
- Why does Codacy show unexpected coverage changes?
- Integrating Codacy with your Git workflow
Share your feedback 📢
Did this page help you?
Thanks for the feedback! Is there anything else you'd like to tell us about this page?
255 characters left
We're sorry to hear that. Please let us know what we can improve:
255 characters left
Alternatively, you can create a more detailed issue on our GitHub repository.
Thanks for helping improve the Codacy documentation.
Edit this page on GitHub if you notice something wrong or missing.
If you have a question or need help please contact support@codacy.com.