Skip to main content
Select language: current language is Japanese
Copilotを検索または要求する
メニューを開く
サイドバーを折りたたむサイドバーを展開する

Fixing code quality findings in your repository backlog

Generate autofixes for findings on the default branch of your repository, or dismiss findings that aren't relevant.

この機能を使用できるユーザーについて

書き込み アクセスを持つユーザー

GitHub Team または GitHub Enterprise Cloud

ヒント

If you're new to Code Quality, see Raising your repository's code quality score for a guided walkthrough of reviewing and improving your repository's quality scores.

How Code Quality works on your default branch

Code Quality scans your default branch and reports findings on "コードの品質" pages on the Security and quality tab of your repository. It runs two types of analysis.

  1. 標準の結果: Code Quality uses CodeQL to perform a deterministic, rules-based scan of your default branch. Finding are grouped by rule and language, labeled by severity (Error, Warning, Note), and each includes a suggested autofix.

  2. AI の結果: Code Quality uses AI-powered analysis to identify quality issues in the files most recently pushed to your default branch, including issues that rule-based analysis may not detect - such as best practices, naming conventions, or design considerations.

メモ

The "AI の結果" page for recently changed files is currently in パブリック プレビュー and subject to change.

For information on resolving AI の結果, see Fixing code quality findings in recently merged files.

Resolving a standard finding

  1. リポジトリの [ Security and quality ] タブに移動します。

  2. クリックして コードの品質 を展開し、標準の結果 をクリックします。

  3. Use the dashboard filters to focus on the findings most likely to affect your quality scores. For example, to see all "Error"-level findings for "Reliability", set the filter to:

    is:open category:reliability severity:error

  4. Findings are grouped by rule. Click a rule name to be taken to a detailed view of all findings for that rule.

    Screenshot showing a rule in the "Standard findings" view. The rule name is highlighted in dark orange.

  5. Click Show more, then review the explanation of the rule, what the recommended fix is, supporting code examples and references.

    Screenshot showing the results for a code quality rule. The text "Show more" is highlighted in dark orange.

  6. To the right of an individual finding, click Generate fix.

  7. Review the diff of the proposed change. If you agree with it, click Open pull request.

  8. In the "Commit autofix to branch" dialog, select "Open a pull request", then click Commit change.

  9. When the autofix pull request is ready for review, change its status from "Draft" to "Ready for review", and wait for CI checks to pass before merging.

  10. Alternatively, if a finding isn't relevant or actionable, click Dismiss. For example, you might dismiss a finding that is in legacy code no longer maintained, is a known exception to your team's coding standards, or is a false positive that doesn't pose a real quality risk.

To raise a maintainability or reliability score, you must resolve every finding at the highest severity level currently affecting that metric. See メトリックと評価のリファレンス.

Verifying that your code quality scores have updated

After your autofix pull requests are merged, return to the "標準の結果" view to confirm that:

  • The number of findings has decreased.
  • The maintainability or reliability score has improved, if you resolved all findings at the current minimum severity level for that metric.

Next steps

Morty Proxy This is a proxified and sanitized view of the page, visit original site.