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

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

Pull Requests page#

The Pull Requests page displays an overview of the pull requests in your repository, such as the analysis status and the number of new and fixed issues for each pull request. This allows you to monitor the code quality of the work in progress in your repository.

By default, the page lists open pull requests but you can use the drop-down list at the top of the page to display the merged pull requests.

Pull Requests page

Click a specific pull request to see detailed information about the code quality changes introduced by that pull request.

Pull request detail

The next sections describe each area of the pull request detail page.

Pull request status#

This area displays the information that identifies the pull request (head and base branches, date, and name), as well as:

Pull request status

Pull request quality overview#

This area displays the quality gate status and an overview of the code quality metrics for the pull request:

  • The quality gate status is either Not up to standards or Up to standards depending on the quality gate rules for your repository.

    If you don't have any rules enabled for pull requests, the status is always Up to standards.

  • The variation of the following code quality metrics introduced by the pull request is displayed either as a positive or negative variation, no variation (represented by =), or not applicable (represented by ):

    • Issues: Number of new or fixed issues
    • Duplication: Variation of the number of duplicated code blocks
    • Complexity: Variation of complexity

    • Coverage variation: Variation of code coverage percentage relative to the target branch

    • Diff coverage: Code coverage of the coverable lines added or changed by the pull request, or (not applicable) if there aren't any coverable lines added or changed

    Depending on the languages being analyzed or if you haven't set up coverage for your repository, some metrics may not be calculated (represented by -).

    Note

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

  • The colors depend on the quality gate rules for your repository:

    • Green: The metric passes the quality gate
    • Red: The metric fails the quality gate
    • Gray: There aren't quality gate rules configured for the metric or the value doesn't impact the quality gate

    Notes

    If you change the quality gate rules you must reanalyze the pull request to update the color of the metrics, except for coverage which updates immediately after you save your changes on the Quality Settings page.

Pull request quality overview

Issues tabs#

The New Issues and Fixed Issues tabs display the list of issues that the commit created or fixed.

Click the title of an issue to see the following information:

  • The contributor and date of the commit that introduced the issue
  • The tool that reported the issue and the estimated time to fix it
  • What's the issue and how to solve it
  • The programming language and category of the issue

Use the options in the cogwheel menu of each issue to ignore and manage issues.

New Issues and Fixed Issues tabs

Possible issues#

In some situations, Codacy may report either new or fixed possible issues on a pull request, which means that the code analysis detected these issues in lines of code that weren't changed by that pull request. This gives you awareness to how your changes may be affecting other parts of your code.

The following are example situations that can lead to possible issues:

  • The issue was either created or fixed in the current pull request, but the static code analysis tools reported the issue on a line that didn't change in the pull request. For example, if you remove the line containing the declaration of a variable you may get an "undeclared variable" issue in other lines that use that variable.

  • If a file had more than 50 issues reported by the same tool and you push a new commit that fixes some of these issues, Codacy will report more issues until the limit of 50 issues. These issues will be possible issues if they're outside the lines of code changed in the new commit.

Note

If you're using GitHub you may see annotations for possible issues reported under Unchanged files with check annotations on the Files changed tab of your pull requests.

This happens when Codacy reports possible issues in files that weren't changed in your pull request. Read more about this GitHub feature.

Duplication tabs#

The New Duplication and Fixed Duplication tabs display the list of duplicated blocks that the pull request created or fixed.

New Duplication and Fixed Duplication tabs

Files tab#

The Files tab displays the variation of the following code quality metrics that the pull request introduced to the files in your repository, displayed either as a positive or negative variation, or no variation (represented by =):

  • Issues: Number of new or fixed issues
  • Duplication: Variation of the number of duplicated code blocks
  • Complexity: Variation of complexity
  • Coverage variation: Variation of code coverage percentage relative to the target branch

Depending on the languages being analyzed or if you haven't set up coverage for your repository, some metrics may not be calculated (represented by -).

The option Show files without code quality changes allows you to list all files that the pull request updated, even if their code quality metrics didn't change.

Files tab

Diff tab#

The Diff tab displays the line differences in each file that was changed in the pull request.

Diff tab

Commits tab#

The Commits tab displays an overview of each commit included in the pull request, such as the analysis status and the number of new and fixed issues for each commit.

Commits tab

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 October 11, 2022