Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 3.12 KB

File metadata and controls

45 lines (34 loc) · 3.12 KB
title Enabling {% data variables.product.prodname_code_quality %}
shortTitle Enable Code Quality
intro Use {% data variables.product.prodname_code_quality_short %} to automatically catch, fix, and report on code quality issues in pull requests and on your default branch.
versions
feature
code-quality
product {% data reusables.gated-features.code-quality-availability %}
permissions {% data reusables.permissions.code-quality-repo-enable %}
contentType how-tos
redirect_from
/code-security/code-quality/how-tos/enable-code-quality
category
Improve code quality

{% data reusables.code-quality.code-quality-preview-note %}

Prerequisites

  • {% data variables.product.prodname_actions %} must be enabled because {% data variables.product.prodname_code_quality_short %} uses actions to run each {% data variables.product.prodname_codeql %} analysis.
  • To get the full benefit of the feature, your repository should include one of the languages supported for quality analysis by {% data variables.product.prodname_codeql %}. See Supported languages.

Enabling {% data variables.product.prodname_code_quality_short %} for a repository

{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %}

  1. In the sidebar, under "Security", click {% data variables.code-quality.code_quality_ui_settings %} to display the "{% data variables.code-quality.code_quality_ui %}" page.

  2. Click Enable code quality.

    [!NOTE] If Enable code quality is missing from this view, your enterprise owner has disabled the use of {% data variables.product.prodname_code_quality_short %} for your organization. See AUTOTITLE.

  3. Review the information on the Code quality page:

    • Languages: If you want to disable {% data variables.product.prodname_codeql %} analysis for any of the languages, clear the associated check box.
    • Runner type: If you want to use a different runner, choose Labeled runner and define the Runner label. See AUTOTITLE and AUTOTITLE.
  4. Click Save changes to save your configuration for {% data variables.product.prodname_code_quality_short %}.

Tip

If your organization has configured caching of private registries, these will be available for code quality analysis to use to resolve dependencies. See AUTOTITLE.

Next steps

  • For your repository: Explore your code quality findings and merge your first fix. See AUTOTITLE.
  • For your organization: Understand the code health of your repositories at a glance. See AUTOTITLE.