(5.6.6) Quality Gate counts code smells as issues?

issues
q_gate

(Alex Nikulin) #1

Hello,

I’ve set up a quality gate with following parameters:

  • Code smells: is greater than 100
  • Critical issues: is greater than 0

Now when I perform project analysis, and have no bugs or vulnerabilities detected, the quality gate fails because some of the code smells have critical or blocker severity.

So I wonder why this is happening? Looking at the quality gate configuration, I thought that the code smells counted separately from issues (while issues are bugs + vulnerabilities?).

Is it possible to prevent quality gate failing because of code smells (with any severity) and limit it to issues only?

Thanks.


(G Ann Campbell) #2

Hi,

First, I need to point out that the current version of SonarQube is 7.2, and the current LTS is 6.7.5. You’re going to have a hard time finding help with versions prior to that.

However, you’ve asked a very general question that applies across versions: yes Code Smells are Issues. For what you’re trying to achieve, you should set 2 separate conditions, one on the Reliability Rating and one on the Security Rating. You’ll find the scale in the docs.

Ann