Skip to content
This documentation is a preview of the pull request #2074

For the latest updates and improvements in production, open docs.codacy.com instead.

Quality Commits page#

The Quality Commits page displays an overview of the commits in your repository, such as the analysis status and the code quality metrics for each commit. This allows you to monitor the evolution of the code quality per commit in your repository.

By default, the page lists the commits on the main branch of your repository, but if you have more than one branch enabled you can use the drop-down list at the top of the page to display commits on other branches.

Commits page

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

Commit detail

The next sections describe each area of the commit detail page.

Commit status#

Commit status

This area displays the information that identifies the commit (commit message, committer, SHA hash, and last updated date), as well as:

Commit quality overview#

Commit quality overview

This area displays the quality gate status for the commit and the code quality metrics with a gate set up:

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

    If there are no gate rules enabled for commits, the status is always Up to quality standards.

  • The variation introduced by the commit is displayed either as a positive or negative variation, or no variation (represented by =) for code quality metrics with a gate set up:

    • Issues: Number of new issues
    • Duplication: Changes in the number of duplicated code blocks
    • Complexity: Changes in code complexity

    • Coverage variation: Changes in code coverage percentage compared with the parent commit

    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: The metric has no value

    Note

    If you change the quality gate rules you must reanalyze the commit to update the metrics and optionally re-upload the Coverage report if you also changed the coverage gate rules.

Issues tab#

The Issues tab displays the lists of issues that the commit creates or fixes. Use the sidebar filters to filter the list by new issues (including issues of specific severity or category), issues within a specific file, fixed issues, potential new issues, or potential fixed issues.

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

  • The committer and date of the commit that introduced the issue, if available
  • The estimated time to fix the issue
  • What the issue is and how to solve it
  • The tool that reported the issue and the related code pattern

To ignore or manage an issue, click the associated options in the menu.

Issues tab

Potential issues#

Codacy may label some issues as potential, which means that the code analysis detected these issues in lines of code that weren't changed by the analyzed commit. This highlights potential consequences in other parts of your codebase.

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

  • The issue was either created or fixed in the current commit, but the static code analysis tools reported the issue on a line that didn't change in the commit. 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 potential 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 potential issues reported under Unchanged files with check annotations on the Files changed tab of your pull requests.

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

Duplication tab#

The Duplication tab displays the lists of clones (duplicated code blocks) that the commit adds or fixes. You can click a clone to expand it and inspect the code.

Duplication tabs

Complexity tab#

The Complexity tab displays the complexity changes introduced by the commit. Use the sidebar filters to filter the list by high increase (4 or more), low increase (1 to 3), or improvement (less than 0).

Note

When calculating the complexity variation introduced by a commit, Codacy only considers files with a high increase in complexity. For more information, see how Codacy calculates cyclomatic complexity.

Complexity tab

Coverage tab#

The Coverage tab displays a line-by-line view of the coverage variation introduced by the commit. It includes the following areas:

  • A list of files modified by the commit, with additional information for each file:

    • A green plus icon if the file is added or a yellow dot icon if it's modified by the commit
    • The coverage variation introduced by the commit (green or red value) or the total file coverage if there's no variation (grey value)
  • A diff viewer showing for each modified file the diff coverage and a comparison of the old and new file content. The background of any added or modified lines depends on their coverage status:

    • Red: Uncovered line
    • Green: Covered line, labeled with its test coverage count
    • No background: Non-coverable line

Coverage tab

Diff tab#

The Diff tab displays the code changes and issues introduced by the commit. It includes the following areas:

  • A list of files modified by the commit, with additional information for each file:

    • A green plus icon if the file is added or a yellow dot icon if it's modified by the commit
    • The number of new issues introduced by the commit
  • A diff viewer showing for each modified file the diff coverage and a comparison of the old and new file content.

    Lines with issues are highlighted according to issue severity and include a pill label with the issue type and count. Hover over the pill label to view more details or navigate to the issues.

Diff tab

Files tab#

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

  • New issues: Number of new issues
  • Duplication: Changes in the number of duplicated code blocks
  • Complexity: Changes in code complexity
  • Coverage variation: Changes in code coverage percentage compared with the parent commit

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 -).

Files 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.

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.

Last modified April 15, 2024