What are quality profiles in SonarQube?
IntermediateConceptSonarQube
Answer
Short answer
A quality profile is the set of rules SonarQube applies when analysing a given language (e.g. "Sonar way" for Java). You can create custom profiles — enabling stricter security rules, disabling noisy ones — and assign them to projects. Quality profiles decide what issues are raised; quality gates decide pass or fail.
Example
- Copy "Sonar way" for Java → "Company Java".
- Activate extra security rules (e.g. stricter cryptography and logging rules), set severities, deactivate a rule that conflicts with your framework.
- Set it as the default for Java so every new project uses it.
Profiles vs gates
| Quality profile | Quality gate | |
|---|---|---|
| Per | Language | Project |
| Contains | Rules | Pass/fail conditions on metrics |
| Answers | "Which problems do we look for?" | "Is this good enough to ship?" |
What to say in the interview
"Quality profiles are per-language rule sets that determine which issues are raised; quality gates are pass/fail conditions on the results. We maintain company profiles extended from Sonar way and a standard gate on new code."
More on SonarQube
What is SonarQube and how do you integrate it into a pipeline?BeginnerWhat does SonarQube analyse?BeginnerHow do you run SonarQube locally with Docker?BeginnerHow do you scan a project with sonar-scanner?BeginnerHow do you run SonarQube analysis for a Maven project?BeginnerWhat is a quality gate in SonarQube?Beginner