# Customizing Quality Profiles

### Overview <a href="#overview" id="overview"></a>

**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.

{% hint style="info" %}
**Note:** Changes **CANNOT** be made to 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.
{% endhint %}

### Creating a Quality Profile <a href="#creating-a-quality-profile" id="creating-a-quality-profile"></a>

To customize the Quality Profile, follow the steps below:

1. Access the Quality Profile menu from the Organization’s home page.<br>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F643lJ2MWZ8zFvE31EgHc%2Fimage.png?alt=media&#x26;token=eb327f0f-8091-44ba-9603-dd8d97813cea" alt="" width="339"><figcaption><p>Quality Profile menu</p></figcaption></figure>
2. Use the **Create** button at the top right of the page to create a new Quality Profile.<br>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FjnQe9uqhO0b1ESqqwc50%2Fimage.png?alt=media&#x26;token=9f95a752-fe54-4b83-929f-79977bad8d62" alt=""><figcaption><p>Create Quality Profile</p></figcaption></figure>
3. Enter the **Name** and choose a **Language** for the profile. Additionally, you can either extend/copy an existing Quality Profile or create a blank Quality Profile..

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FpcWoN4srT0z5jhFwm2Dt%2FNew%20QP%20Select%208.7.png?alt=media&#x26;token=65d60cf5-50c3-4045-a4c9-9886e0abdb48" alt="" width="375"><figcaption><p>New Quality Profile</p></figcaption></figure>

4. Click **Create**.<br>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FA8ZHRrrErR9KAnTMAq2Y%2Fimage.png?alt=media&#x26;token=0c4a9bff-e9eb-4b45-8dff-972e050cfa11" alt=""><figcaption><p>Create New Quality Profile</p></figcaption></figure>
5. Click on the more icon and then click on **Copy** to copy a default profile.<br>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FshQ3P8WjygJKaCb9rfQW%2Fimage.png?alt=media&#x26;token=242afb18-c5fb-4de8-a1f3-392e5f363fc7" alt=""><figcaption><p>Copy a Default Profile</p></figcaption></figure>
6. Once you have chosen a name for your profile, click the **Activate More** button to begin your customization.<br>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FqVvAOkhSTtESV3Kho1uH%2Fimage.png?alt=media&#x26;token=87b09119-03aa-44e9-b9da-9fa48951fc0e" alt="" width="375"><figcaption><p>Activate More</p></figcaption></figure>
7. Use the filters on the left to determine the rules you want to see, and click the **Activate/Deactivate** button to add/remove them from your quality profile.<br>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F6YASAKN7xnZHZFJCKsT6%2Fimage.png?alt=media&#x26;token=3583aa82-e40c-486a-ba11-241dd1148444" alt=""><figcaption><p>Activate/Deactivate</p></figcaption></figure>
8. You can bulk activate/deactivate rules for your profile using the **Bulk Change** button.<br>

   <figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FwVjkGmx2QSZ5Bi2xddZd%2Fimage.png?alt=media&#x26;token=dd7c1fc4-d466-4d00-b558-e22919902ac8" alt=""><figcaption><p>Bulk Change option</p></figcaption></figure>
9. When activating a rule, you will be given the option to change its **severity** and any other parameters the rule may have.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FVp38TaYZazFTe1akZPD6%2FSeveirty%209.2.png?alt=media&#x26;token=189ac2fc-6413-4028-80ad-6cda832f3151" alt="" width="375"><figcaption><p>Activate</p></figcaption></figure>

> **Example**:\
> You can update the severity of the rule to `Major/Critical/Minor/Blocker/Info`
>
> ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FL2Tav7ytrah3PE9mEjoi%2FSeverity%20List%209.3.png?alt=media\&token=c55a17f0-16d7-4c57-a779-fd3634baff74)
>
> To use the rule mentioned above, the parameter `minimumCommentDensity` needs to be set to a value. The minimum value is 25. If you use the value of 35 as an example, the density of comment lines of 35 will be considered.
>
> Set the value for `suppressUnitTestViolations`.\
> `Default`: *The Default is actually 'Display' and it will display the unit test violations suppression, means, the issues will get displayed in Test Classes for the parameters.*\
> `Display`: *Displays the unit test violations suppression.*\
> `Suppress`: *Unit test violations will be suppressed.*<br>
>
> ![](https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FrRUGnbG7Hqqt9TahZ28Y%2FTestList%209.4.png?alt=media\&token=93d97b6b-8181-4649-8c8f-0d6510d4af8a)

### Updating Quality Profiles

To make sure that Quality Profiles used on CodeScan projects are up to date, you can find information about recently added rules by navigating to Organization → Quality Profiles:

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FI0rSrmNcHkHEo50vPGcb%2FRecently%20Added%20Rules%209.5.png?alt=media&#x26;token=3a535818-848e-4b63-92af-536af3927268" alt=""><figcaption><p>Quality Profiles</p></figcaption></figure>

You can review updates and assign new rules to your Quality Profiles to make sure your code is clean and secure.

Also, on the right side, the list of recently deprecated rules is available. We recommended you remove these from the Quality Profiles used:

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2F2lIp7ww2PeOOqP843ouQ%2FDeprecated%20Rules%209.6.png?alt=media&#x26;token=17709628-e47b-4fce-bb8a-005e51a67640" alt=""><figcaption><p>Deprecated Rules</p></figcaption></figure>
