Customising Quality Profiles
  • 04 Jul 2023
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Customising Quality Profiles

  • Dark
    Light
  • PDF

Article Summary

Overview

Quality Profiles determine the list of rules used in a scan. Quality Profiles can be customized by adding and removing rules, setting severities, and changing scope where applicable.

To make a custom Quality Profile, you can create a new profile or copy one of our default profiles from the list as a starting point.

Point to Note:

Changes CAN NOT be made to the default profiles, only to custom profiles. If you are using a default profile and would like to remove a rule, please make a copy of the default profile and make your changes to the copied profile.

Creating a Quality Profile

To customize the Quality Profile, follow the steps below:

  1. Access the Quality Profile menu from the Organization’s home page.
    image.png

image.png

  1. Use the Create button at the top right of the page to create a new Quality Profile.
  2. Enter the Name and choose a Language for the profile. Additionally, you can give your new profile a Parent profile.
  3. Click Create.
    image.png
  4. Click on the (image.png) icon and then click on Copy to copy a default profile.
    image.png
  5. Once you have chosen a name for your profile, click the Activate More button to begin your customization.
    image.png
  6. Use the filters on the left to determine the rules you want to see, and click the active/inactive button to add/remove them from your quality profile.
    image.png
  7. You can bulk activate/deactivate rules for your profile using the Bulk Change button.
    image.png
  8. When activating a rule, you will be given the option to change its severity and any other parameters the rule may have.

Example:
To activate the rule depicted in the image (shown below), you must configure three parameters:, Severity, minimumCommentDensity and suppressUnitTestViolations.
image-V160VPZD.png

  • Severity: This parameter allows you to set the severity of the rule to one of the following options: Major, Critical, Minor, Blocker, or Info.
  • minimumCommentDensity: It requires a numerical value, and the minimum allowed value is 25. For instance, if you set it to 35, the density of the comment lines will be considered as 35.
  • suppressUnitTestViolations: This parameter determines whether you want to display the unit test issues in the test classes console or hide them. You have two values to enter here:
    • Display: This will show the violations in the console output of the unit tests.
    • Suppress: This will suppress all unit test violations, preventing them from being displayed.

If the suppressUnitTestViolations field is left empty or not provided, the default value, "Display," will be considered.

Setting a default Quality Profile

By setting a default Quality Profile, you assign every project without a specific Quality Profile to use the default one. To assign Quality Profiles to specific Projects, use the Project Settings > Quality Profiles menu for your project and select the one you would like to use.
image.png

image.png


Was this article helpful?