close
Skip to content

Latest commit

 

History

History
66 lines (46 loc) · 5.58 KB

File metadata and controls

66 lines (46 loc) · 5.58 KB
title GitHub Code Quality
shortTitle GitHub Code Quality
allowTitleToDifferFromFilename true
intro {% data variables.product.prodname_code_quality %} catches quality issues before merge, delivers one-click {% data variables.product.prodname_copilot_short %}-powered fixes inline, and checks your code coverage.
product {% data reusables.gated-features.code-quality-availability %}
versions
feature
code-quality
contentType concepts
audience
driver
redirect_from
/code-security/code-quality/concepts/about-code-quality
/code-security/code-quality/concepts
/code-security/code-quality
/code-security/concepts/about-code-quality
category
Improve code quality

{% data variables.product.prodname_code_quality %} analyzes your code for quality and coverage issues and delivers {% data variables.product.prodname_copilot_short %}-powered fixes you can apply in one click. It runs in two places:

  • On pull requests, {% data variables.product.prodname_code_quality_short %} uses deterministic {% data variables.product.prodname_codeql %} rules to detect known anti-patterns and posts findings as inline comments before code is merged. If you upload a Cobertura XML coverage report, coverage metrics show whether a change maintains or reduces coverage. You can enforce quality and coverage thresholds with rulesets to block pull requests that don't meet your criteria, so new quality debt doesn't accumulate.
  • On the default branch, rules-based scans identify existing quality debt across your codebase, with autofixes you can apply directly or assign to {% data variables.copilot.copilot_cloud_agent %} to resolve on your behalf. AI-powered analysis also runs on recently changed files, flagging issues that fall outside existing rule sets, including languages not yet covered by {% data variables.product.prodname_codeql %} queries.

Note

On pull requests, {% data variables.product.prodname_code_quality_short %} posts rules-based {% data variables.product.prodname_codeql %} findings only. If you also want AI-powered reviews of your pull requests, you can enable {% data variables.copilot.copilot_code-review %} separately. See AUTOTITLE.

Use cases

Here's what {% data variables.product.prodname_code_quality %} looks like in practice.

For developers and teams:

  • A developer opens a pull request that introduces a reliability or maintainability issue. {% data variables.product.prodname_code_quality_short %} posts a comment explaining the issue and offers a one-click fix before the code is merged. The developer also sees a report of coverage metrics, and can tell at a glance whether the pull request improves or reduces coverage compared to the default branch.
  • A team inherits a large codebase with years of accumulated quality debt. {% data variables.product.prodname_code_quality_short %} scans the default branch, surfaces findings with autofixes on a dashboard, and the team assigns remediation work to {% data variables.copilot.copilot_cloud_agent %} to open fix pull requests automatically.
  • A team adopts AI coding assistants and needs assurance that generated code meets the same bar as hand-written code. AI-powered analysis catches issues in recently changed files that rule-based queries weren't written for, while {% data variables.product.prodname_codeql %} rules cover well-defined anti-patterns.

For administrators and leads:

  • An engineering lead sets coverage and quality thresholds using rulesets. Pull requests that don't meet the criteria are blocked from merging, so no new quality or coverage debt accumulates.
  • An administrator needs visibility across repositories for audits or compliance reporting. {% data variables.product.prodname_code_quality_short %} reports through the security overview alongside security tools, so they can see quality posture across the organization at a glance, identify which repositories need attention, and track improvement metrics using standard {% data variables.product.github %} audit controls and policies.

Availability and billing

Usage costs are determined by:

  • A per-seat license fee based on active committers.
  • {% data variables.product.prodname_copilot_short %}-powered autofixes for findings in pull requests and on the default branch, alongside AI-powered detections on recently merged code, which consume {% data variables.product.prodname_ai_credits %} (no {% data variables.product.prodname_copilot_short %} license required).
  • {% data variables.product.prodname_actions %} minutes for deterministic {% data variables.product.prodname_codeql %} scans, if you don't use self-hosted runners.

Optional features, such as delegating code quality remediation work to {% data variables.product.prodname_copilot_short %}, require a {% data variables.product.prodname_copilot_short %} license.

For more information, see AUTOTITLE.

Supported languages

{% data variables.product.prodname_code_quality_short %} performs rule-based analysis of the following languages using {% data variables.product.prodname_codeql %}:

{% data reusables.code-quality.codeql-supported-languages %}

{% data variables.product.prodname_code_quality_short %} also performs AI-powered analysis on your repository's recently changed code, including languages beyond those supported by rule-based queries.

Next steps

  • Learn how to fix code quality findings on your pull request. See AUTOTITLE.