Start Free
Latest | Quality standards administration | Managing quality profiles | Editing a quality profile

Editing a custom quality profile

On this page

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

Activating rules in a quality profile

You can activate rules in any custom quality profile.

Activating a single rule

When you activate a single rule, you can customize the rule parameters in the quality profile: severity level(s), configurable parameters (if any), prioritized option (starting in Enterprise Edition; for more information, see Marking a rule as prioritized below). 

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

  1. Go to Quality Profiles and retrieve the quality profile.
  2. At the bottom of the Rule breakdown section, select Activate more. The list of available rules is displayed.
  3. To activate a single rule, select Activate at the far right of the rule row. The Activate in Quality Profile dialog opens.
  4. If necessary, customize the rule parameters.
  5. Select Activate.

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

  1. Go to Rules and retrieve the rule.
  2. In the rule page, navigate to the bottom to the Quality Profiles section. 
  3. In front of Quality Profiles, select Activate. The Activate in Quality Profile dialog 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 dialog. 
  5. Customize the rule parameters if necessary.
  6. Select Activate.

Activating all inactive rules

To activate all inactive rules in a custom quality profile:

  1. Go to Quality Profiles and retrieve the 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 dialog opens.
  4. Confirm.

Activating rules from a profile comparison

When you compare two profiles, you can activate a rule from the comparison results. See Comparing quality profiles.

Deactivating rules in a quality profile

You can deactivate rules in any custom quality profile. The permission to deactivate inherited rules in a child profile is managed at the global level. It is by default enabled. 

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

  1. Go to Quality Profiles and retrieve the 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. Go to Rules and retrieve the rule.
  2. In the rule page, navigate to the bottom to the Quality Profiles section. 
  3. In front of the quality profile, select Deactivate.

Customizing a rule's parameters in a quality profile

In a custom quality profile, you can customize the severity level(s) assigned to a rule or rule's configurable parameters. If the quality profile inherits from a parent profile, the rule is considered overridden.

To customize the parameters of a rule in a custom quality profile:

  1. Go to Quality Profiles and retrieve the quality profile.
  2. In the Inheritance section, select the x active rules hyperlink. The list of active rules displayed.
  3. In the list, select Change on the row of the rule whose parameters you want to change. The Change Details of Quality Profile dialog opens.
  4. In the dialog, change the parameters.
  5. Select Save.
  6. If the quality profile inherits from a parent profile, you can revert to the parent profile's rule configuration by selecting Revert to Parent Definition.

Marking a rule as prioritized

Starting in Enterprise Edition, rules can be marked as prioritzed in a custom quality profile. A quality gate can be set to fail if prioritized issues are detected in the overall code. 

To mark a rule as Prioritized in a custom quality profile, proceed as described above in Customizing a rule's parameters in a quality profile.

To add the prioritized rule condition to your quality gate see Adding the condition on prioritized rules in Managing custom quality gates

Renaming a quality profile

You can rename any custom quality profile.

To rename a quality profile:

  1. Go to Quality Profiles and retrieve the quality profile.
  2. Select the three-dot button.
  3. Select Rename. the Rename Profile dialog 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. Go to Quality Profiles and retrieve the quality profile.
  2. In the Inheritance section of the quality profile, select Change parent. The Change Parent dialog opens.
  3. In the dialog, select the new parent or None to remove the inheritance.
  4. Select Change.

Was this page helpful?

© 2008-2025 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARQUBE, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License