Skip to content
This documentation applies to Codacy Self-hosted v11.0.0

For the latest updates and improvements, see the latest Cloud documentation instead.

Adjusting quality settings#

The Quality settings allow you to configure quality gates for your pull requests and commits, and define quality goals that help you monitor the progress of the code quality in your repository dashboard.

To access the quality settings, open your repository Settings, tab Quality Settings:

Quality settings

The following sections explain the settings in detail.

Gates#

These settings configure when Codacy reports 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

To enable pull request status directly on your Git provider, see the instructions for GitHub, GitLab, or Bitbucket, depending on your Git provider. For Codacy to report the coverage status on your pull requests you must also turn on the rule Diff coverage is under or Coverage variation is under.

If you want to block merging pull requests that aren't up to standards see How do I block merging pull requests using Codacy as a quality gate?

The following screenshot displays the default configuration values:

Quality gates

  • 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.
  • 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.
  • 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. The maximum value is 1%.

    To ensure that commits and pull requests:

    • Can decrease the coverage, set the value between -100.00 and 0.00%
    • Can't decrease the coverage, set the value to 0.00%
    • Must improve the coverage, set the value between 0.00 and 1.00%

Note

Learn how Codacy calculates the code quality metrics in more detail:

Goals#

These settings configure the quality goals for your repository, and which files Codacy considers complex or duplicated.

Codacy displays the quality goals as dashed lines on the quality evolution chart to help you monitor the progress and overall quality status of your repository.

The following screenshot displays the default configuration values:

Quality settings for the repository

  • Issues are over: Defines the threshold displayed on the tab Issues of the quality evolution chart.
  • Complexity of files is over: Defines the threshold displayed on the tab Complexity of the quality evolution chart.
  • File is complex when over: A file is considered complex when its complexity is over this value.
  • Duplication of files is over: Defines the threshold displayed on the tab Duplication of the quality evolution chart.
  • File is duplicate when over: A file is considered duplicated when it has more clones than this value.
  • Coverage is under: Defines the threshold displayed on the tab Coverage of the quality evolution chart.

See also#

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?

We're sorry to hear that. Please let us know what we can improve:

Alternatively, you can create a more detailed issue on our GitHub repository.

Thanks for helping improve the Codacy documentation.

If you have a question or need help please contact support@codacy.com.

Last modified November 22, 2022