Quality standards

This page explains how to configure at the global level parameters or features impacting the quality gates or profiles.

You need the Administer system permission.

To manage the quality gates in your instance, see Managing quality gates.

To manage the quality profiles in your instance, see Managing quality profiles.

Setting up the Sandbox feature at the instance level

As an instance admin, you can enable the Sandbox feature globally in your instance. Project administrators can then change the feature status (on or off) for their project. For more information about this feature, see Issue management solution.

If you disable the Sandbox feature for your instance, any existing sandboxed issues will remain in the Sandbox and can still be triaged by users.

To set up the Sandbox feature in your instance:

  1. Got to Administration > Configuration > General settings > General.

  2. In Issues > Sandbox specific issue categories after SonarQube update, enable the feature. A configuration pane is displayed. The figure below shows the option to enable (1) and the configuration pane that is displayed (2) for an instance in MQR mode (for information about the instance mode, see Changing instance modes).

When you enable the Sandbox feature (1) the condition configuration pane is displayed (2)
  1. Define the sandbox conditions:

    1. Select the software quality (in MQR mode) or the type (in Standard Experience) of issues to be moved to the Sandbox. The severity condition box is displayed.

    2. Select the severity(ies) of the issues to be moved.

    3. Proceed the same way for each other software quality or issue type you want to configure.

  2. If project administrators should be able to change the Sandbox conditions, select Yes for the corresponding option. Otherwise, select No.

  3. In Should sandbox feature be on or off by default?, set the default status (On or Off) of the Sandbox feature for projects (the project admins can change it):

    • On: The Sandbox feature will be On by default for all new projects. This will also set the Sandbox feature to On for existing projects (this applies when you first enable the sandbox feature and anytime you change this parameter).

    • Off: The Sandbox feature will be Off by default for all new projects. This will also set the Sandbox feature to Off for existing projects (this applies when you first enable the Sandbox feature and anytime you change this parameter).

  4. Select Save.

Setting up the Sandbox feature through system properties

After an update, to make sure the feature is enabled before the analysis of any of your projects is done, you can set system properties before you restart your SonarQube Server after the update. The setup depends on your installation type.

For more information about the mentioned system properties, see Sandbox.

ZIP file installation

In Step 3 of the update procedure (see Updating a ZIP file instance), add the Sandbox properties to sonar.properties as illustrated below. Adapt the property values to your needs.

sonar.issues.sandbox.enabled=true
sonar.issues.sandbox.override.enabled=true
sonar.issues.sandbox.default=true
sonar.issues.sandbox.software-qualities=[{"softwareQuality":"MAINTAINABILITY","impactSeverities":["LOW","INFO"]}]
Docker image installation

In Step 2 of the update procedure (see Updating a Docker image instance), add the Sandbox environment variables to the docker run command as illustrated below. Adapt the environment variable values to your needs.

-e SONAR_ISSUES_SANDBOX_ENABLED=true \
-e SONAR_ISSUES_SANDBOX_OVERRIDE_ENABLED=true \
-e SONAR_ISSUES_SANDBOX_DEFAULT=true \
-e SONAR_ISSUES_SANDBOX_SOFTWARE_QUALITIES='[{"softwareQuality":"MAINTAINABILITY","impactSeverities":["LOW","INFO"]}]' \
Kubernetes installation

In step 1 of the standard update procedure (see Standard procedure), add the Sandbox system properties either as sonar properties (see ZIP installation above) or environment variables (see Docker image installation above) to your values.yaml . For information about the adding of system properties in a Kubernetes installation, see In a Kubernetes installation.

Changing the quality gate fugde factor at the global level

The quality gate fudge factor refers to a mechanism where conditions on duplication and coverage are ignored until the number of new lines is at least 20. This is used to avoid overly strict enforcement when dealing with small changes, as minor issues might disproportionately impact the overall quality gate status.

The fudge factor is enabled by default in your instance. This global setting is applied to all new projects. Project administrators can override it for their project.

To disable the fudge factor at the global level:

  1. Go to Administration > configuration > General Settings > General > Quality Gate.

  2. Unselect the Ignore duplication and coverage on small changes option.

You can disable:

  • The notifications sent by default to quality profile administrators on built-in quality profiles update.

  • The deactivation of inherited rules by quality profile administrators.

Proceed as follows:

  1. Go to Administration > configuration > General Settings > General > Quality Profile.

  2. Select Avoid quality profiles notification or unselect Enable deactivation of inherited rules.

Last updated

Was this helpful?