For the complete documentation index, see llms.txt. This page is also available as Markdown.

Editing a quality profile

To edit a quality profile, you need the Administer Quality Profiles permission or be authorized to manage this particular profile.

This feature is only available in the Team and Enterprise plans. See Subscription plans for more information.

Those with the Administer Quality Profiles permission and Users authorized to manage a particular profile have full control of the quality profile's definition. These users can rename a profile, change its parent, activate and deactivate rules, as well as customize a rule's parameters within that quality profile.

Activating rules in a quality profile

You can activate rules in any custom quality profile.

If your organization is on a Free or Team plan, you may see rules from the Enterprise plan with misra- tags. You will have to upgrade to the Enterprise plan in order to activate these rules in a custom quality profile.

Activating a single rule

When you activate a single rule, you can customize the rule configurable parameters, if any, in the quality profile.

To activate a single rule in a custom quality profile (from the quality profile’s page):

  1. See Retrieving your organizations to access your organization, then go to the Quality profiles page.

Activating more rules for a quality profile
  1. Locate the quality profile’s row and display the list of available rules as follows:

    1. Either select the action menu on the right side of the row, and select Activate more rules.

    2. Or select the profile and, in the profile page, select the Activate more button at the bottom of the Rule breakdown section.

  2. To activate a single rule, select Activate at the far right of the rule row. The Activate in Quality Profile modal opens.

  3. If necessary, customize the rule parameters.

  4. Select Activate.

From the rules page

To activate a single rule in a custom quality profile (from the rule’s page):

  1. See Retrieving your organizations to access your organization, then go to the Rules page and retrieve your rule.

  2. On the Rules page, navigate to the bottom to the Quality profiles section.

  3. In front of Quality profiles, select Activate. The Activate rule in Quality Profile modal opens.

  4. In Quality Profile, select the quality profile. Note that if the rule is active in all profiles except one, this profile will be automatically selected in the modal.

  5. Customize the rule parameters if applicable and necessary.

  6. Select Activate.

Activating all inactive rules

To activate all inactive rules in a custom quality profile:

  1. See Retrieving your organizations to access your organization, then go to the Quality profiles page and retrieve your quality profile.

  2. At the bottom of the Rule breakdown section, select Activate more. The list of inactive rules is displayed.

  3. In the top tool bar, select Bulk Change > Activate in <YOUR PROFILE>. A confirmation modal opens.

  4. Confirm.

Activating rules from a profile comparison

When you compare two profiles, you can activate a rule from the comparison results. See the Viewing quality profiles to learn about comparing profiles.

Deactivating rules in a quality profile

You can deactivate rules in any custom quality profile.

To deactivate rules in a custom quality profile (from the quality profile’s page):

  1. See Retrieving your organizations to access your organization, then go to the Quality profiles page and retrieve your quality profile.

  2. In the Inheritance section, select the X active rules hyperlink. The list of active rules displayed.

  3. To deactivate a single rule, select Deactivate at the far right of the rule row.

  4. To deactivate all active rules, select Bulk Change > Deactivate in <YOUR PROFILE> in the top tool bar.

To deactivate a single rule in a custom quality profile (from the rule’s page):

  1. See Retrieving your organizations to access your organization, then go to the Rules page and retrieve your rule.

  2. On the rule page, navigate to the bottom, in the Quality profiles section.

  3. In front of the custom quality profile, select Deactivate.

Customizing a rule’s severity levels in a quality profile

There are cases when you might want to change a rule’s severity level in a quality profile to adjust the rule’s impact on the quality gate, for example:

  • You might disagree with the default severity level set in SonarQube.

  • You added a new rule to a quality profile and want to start with a lower severity level without breaking your quality gate.

  • You want certain rules, when broken, to block your quality gate from passing.

To change a rule’s severity levels in a quality profile:

Changing a rule’s severity levels from the Rules page
  1. Retrieve your organization. See Retrieving your organizations for details.

  2. Go to Rules.

  3. In the filters column, scroll down to the Quality profile section and select the quality profile to which you want to apply the change.

  4. Find the rule and select Change.

  5. In the modal, apply new severity levels to one or more software qualities (Security, Reliability, Maintainability) for this quality profile.

  6. Select Save.

Updating a rule’s severity levels for a quality profile

Alternatively, you can change the rule’s severity levels from within the quality profile:

Changing a rule’s severity levels from the quality profile
  1. Retrieve your organization. See Retrieving your organizations for details.

  2. Go to Quality profiles.

  3. In the Rules column, select the rule count for your quality profile.

  4. Find the rule and select Change.

  5. In the modal, apply new severity levels to one or more software qualities (Security, Reliability, Maintainability) for this quality profile.

  6. Select Save.

A rule can have only one type, whereas it can have multiple software qualities. See Software qualities and Types for details.

SonarQube maps the severity levels based on priority, with Security ranked highest, then Reliability and Maintainability. Your customized software quality severities map to the type severity, which determines your rating measures and quality gate.

Renaming a quality profile

You can rename any custom quality profile.

To rename a quality profile:

  1. See Retrieving your organizations to access your organization, then go to the Quality profiles page and retrieve your quality profile.

  2. Select the action menu.

  3. Select Rename. The Rename Profile modal opens.

  4. Enter the new name and select Rename.

Changing the parent of a quality profile

You can change or remove the existing parent, or you can add a parent to a custom quality profile. To do so:

  1. See Retrieving your organizations to access your organization, then go to the Quality profiles page and retrieve your quality profile.

  2. In the Inheritance section of the quality profile, select Change parent. The Change Parent modal opens.

  3. In the modal, select the new parent or None to remove the inheritance.

  4. Select Change.

Last updated

Was this helpful?