> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cloud/standards/managing-quality-profiles/understanding-quality-profiles.md).

# Understanding quality profiles

Quality profiles are a key part of your SonarQube Cloud configuration because they are composed of a list of rules to check your code against.

## General and language-specific quality profiles <a href="#profile-types" id="profile-types"></a>

Quality profiles come in two types:

* You can apply general profiles to all or multiple languages at once. To create a custom general profile, you select the security standards it must cover and set a rule activation threshold for each software quality: Security, Reliability, and Maintainability.
* You can apply language-specific profiles to a single language. In a custom language-specific profile, you activate and deactivate rules one by one and customize rule parameters.

To manage quality profiles for an organization:

1. Go to *Your organization* > **Policies** > **Quality profiles**. See [Retrieving your organizations](/sonarqube-cloud/getting-started/viewing-organizations.md) to access your organization.
2. Select the **General** or **Language-specific** tab.

<div align="left"><figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-103e340a8c53c1bb99862cecb60717a530a273e9%2Fsonarqube-cloud-quality-profile.png?alt=media" alt="The organization Quality profiles page with the General and Language-specific tabs, the In use tab, and the Sonar way comprehensive profile card"><figcaption></figcaption></figure></div>

Both are ways of assigning quality profiles to the same set of languages, and neither takes priority over the other. For a given language, the most recent assignment applies. For example, if you set a general profile as the default for all languages, and then set another profile as the default for Java on the **Language-specific** tab, all languages except Java use the general profile.

With general profiles, you no longer need to repeat the same change language by language.

The *Sonar agentic AI* and **Sonar MISRA compliance** quality profiles cover only a few languages, so they’re available only as language-specific profiles.

## Quality profile set assigned to a language <a href="#quality-profile-set-assigned-to-a-language" id="quality-profile-set-assigned-to-a-language"></a>

On the **Language-specific** tab, several quality profiles can be assigned to a language in your organization:

* Three built-in Sonar way profiles are provided: **Sonar way core**, **Sonar way extended**, and **Sonar way comprehensive**. You cannot edit these profiles. See [Built-in quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/built-in-quality-profiles.md) for details on each.
* From the Team plan, you can create custom quality profiles to meet your coding analysis needs.\
  Sonar way core is designed to be broadly suitable for most projects, but it is intended only as a starting point.
* Your custom general profiles are also listed for each language, with a **General custom profile** label next to their name.

In the quality profile set of a language, a profile is defined as the default profile. The default profile is used for the analysis of a project if no profile is explicitly defined for that project.

In this ABAP example, the built-in Sonar way core profile is the default profile. The list also includes the other built-in profiles, custom profiles, and a custom general profile with the **General custom profile** label.

<div align="left"><figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-d27bcb5edfe24f18ec8df29e51329fffaba9771d%2Fsonarqube-cloud-quality-profile-default-example.png?alt=media" alt="The Language-specific tab listing seven ABAP quality profiles, with Sonar way core marked as default and a custom general profile at the bottom"><figcaption></figcaption></figure></div>

A user with the Administer Quality Profiles permission in the organization can create and edit any custom profile and change the default profile of a set. These users can also give other users permission to edit a given custom profile.

## Quality profile definition <a href="#quality-profile-definition" id="quality-profile-definition"></a>

In your organization, a language-specific quality profile:

* Relates to a given programming language.
* Is based on the set of coding rules supported for this language.
* Defines which rules of this set are active in the profile, it means which rules will be taken into account during the code analysis.

A general profile applies the same activation criteria to every language: the security standards you select and a rule activation threshold for each software quality. Rules mapped to the selected security standards stay active even if the thresholds would otherwise exclude them.

A custom language-specific quality profile may customize, for a given rule, configurable parameters. For example, rules that verify conditions against a threshold might allow customization of the threshold value. The customization applies only within the quality profile.

## Quality profile inheritance <a href="#quality-profile-inheritance" id="quality-profile-inheritance"></a>

The inheritance feature allows you to define a parent/child relationship between two quality profiles within the profile set of a language. This way, changes in the parent profile are dynamically reported to the child profile. Note that a child profile can only be a custom quality profile.

A custom general profile always inherits from **Sonar way comprehensive**. You cannot select another parent for it.

In this ABAP example, a custom profile inherits from the built-in Sonar way comprehensive profile.

<figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-f1716063e785c851e3cbcd7463a24a0ced05fac9%2Fsonarqube-cloud-quality-profile-inherit.png?alt=media" alt="The Language-specific tab listing ABAP profiles, with a custom profile indented under the built-in Sonar way comprehensive profile it inherits from"><figcaption></figcaption></figure>

By inheriting from a built-in quality profile, you ensure that you automatically benefit from:

* Newly implemented rules.
* Changes in a rule’s configuration.
* The deactivation of deprecated rules.

You can also create a quality profile hierarchy: a change in a parent profile is reflected in all its child profiles on all hierarchy levels.

The following principles govern the quality profile inheritance:

* The inheritance relationship can be established or removed according to the following:
  * A parent profile can be assigned to a child profile during the child profile creation or at any time during the lifecycle of a custom profile.
  * The inheritance relationship can be removed at any time.
  * A child profile can change to another parent at any time.
  * A parent profile may be a built-in or a custom profile (A child profile is always a custom profile.).
* When an inheritance relationship is established:
  * The child quality profile inherits its parent’s active rules.
  * Active rules existing already in the child profile are not changed.
* A change in a parent profile is automatically reflected in all its child profiles (note that if a child profile changes to another parent, this is considered a change in the parent profile). It means that:
  * A rule activation or deactivation in the parent profile is reflected in the child profiles whatever the status (active or inactive) of the rule in the child profile.
  * A rule parameter change in the parent profile is reflected in the child profiles if the rule is not overridden in the child profile.
* A child quality profile can be changed as follows:
  * An inactive rule can be activated.
  * An active rule can be deactivated.
  * A rule’s configurable parameters can be modified compared to the parent profile. In that case, the rule is considered *overridden*.

{% hint style="info" %}
These principles are the same whether the parent profile is a built-in or a custom profile.
{% endhint %}

## Quality profile association with projects <a href="#quality-profile-association-with-projects" id="quality-profile-association-with-projects"></a>

The default quality profile of a language’s profile set is used for a project if the project is not explicitly associated with another profile for this language.

By default, **Sonar way core** is the organization’s default profile for every language. With the Administer Quality Profiles permission, you can change the default profile of a given language in your organization. You can also set a general profile as the default for all languages or for selected languages in one step. See [Changing default quality profile](/sonarqube-cloud/standards/managing-quality-profiles/changing-default-quality-profile.md).

As a project administrator, you can assign quality profiles to your project. With the Administer Quality Profiles permission, you can assign a quality profile to a list of projects in your organization.

## Quality profiles for compliance standards

As Sonar expands its offering, specialized quality profiles for enterprise-level customers are being developed to address the needs of specific industries.

### The Sonar MISRA compliance quality profiles <a href="#sonar-misra-compliance" id="sonar-misra-compliance"></a>

The **Sonar MISRA compliance** quality profiles are available for the [Enterprise](https://www.sonarsource.com/plans-and-pricing/sonarcloud/) plan. They comprise the following quality profiles:

* Sonar MISRA C++:2023 Compliance
* Sonar MISRA C:2012 Compliance
* Sonar MISRA C:2012 AMD1 + TC1 Compliance
* Sonar MISRA C:2012 AMD2 Compliance
* Sonar MISRA C:2012 AMD3 Compliance
* Sonar MISRA C:2023 Compliance

These quality profiles check your code against a set of software development guidelines for the C or C++ programming languages used in safety and mission-critical systems. MISRA guidelines are published by the [MISRA](https://misra.org.uk/) (Motor Industry Software Reliability Association) consortium. The standards aim to facilitate code safety, security, portability, and reliability. Read [The intelligent approach to achieve MISRA C++:2023 compliance](https://www.sonarsource.com/blog/achieve-misra-c-2023-compliant-source-code/) blog post on the Sonar website for more information.

The **Sonar MISRA compliance** quality profiles are their own built-in profiles, separate from Sonar way core, extended, and comprehensive. None of the three Sonar way profiles cover MISRA. Because they apply only to C and C++, they’re available only on the **Language-specific** tab, not as general profiles. Each Sonar MISRA compliance profile combines Sonar rules mapped one-to-one to the matching MISRA guidelines, to provide both Sonar and MISRA expertise in one quality profile.

You can use these quality profiles as a starting point for your own custom quality profile by adding or removing rules. If you want to create a quality profile only with MISRA rules, you can start one from scratch and add all rules carrying a `misra-` tag to it. See [Editing a quality profile](/sonarqube-cloud/standards/managing-quality-profiles/editing-a-custom-quality-profile.md) for more information.

{% hint style="info" %}
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](https://www.sonarsource.com/plans-and-pricing/sonarcloud/) plan in order to activate these rules in a custom quality profile.
{% endhint %}

MISRA and MISRA C are the registered trade marks of [The MISRA Consortium Limited](https://misra.org.uk/).

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Built-in quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/built-in-quality-profiles.md)
* [Viewing quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/viewing-quality-profiles.md)
* [Creating a quality profile](/sonarqube-cloud/standards/managing-quality-profiles/creating-a-quality-profile.md)
* [Editing a quality profile](/sonarqube-cloud/standards/managing-quality-profiles/editing-a-custom-quality-profile.md)
* [Associating with projects](/sonarqube-cloud/standards/managing-quality-profiles/associating-a-quality-profile-with-projects.md)
* [Changing default quality profile](/sonarqube-cloud/standards/managing-quality-profiles/changing-default-quality-profile.md)
* [Maintaining quality profiles](/sonarqube-cloud/standards/managing-quality-profiles/maintaining-your-custom-quality-profiles.md)
* [Granting permissions to users](/sonarqube-cloud/standards/managing-quality-profiles/authorizing-other-users-to-manage-quality-profile.md)
* [Quality profile](/sonarqube-cloud/managing-your-projects/project-analysis/quality-profile-association.md)
* [Quality profiles for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-profiles-for-agentic-ai.md)

## Related online learning

* <i class="fa-video">:video:</i> [Administering quality profiles in SonarQube](https://www.sonarsource.com/learn/course/core-concepts/99c287ee-6671-471d-b6ff-4ec88be61383/administering-quality-profiles-in-sonarqube)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-cloud/standards/managing-quality-profiles/understanding-quality-profiles.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
