Help to understand why quality gate passes despites the rules that I configured

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) : 7.9.2 (build 30863)
  • what are you trying to achieve : Add quality check that does not allow introducing new code smells

I created the following Quality Gate :

And that produces the following results in Sonar that makes the quality gate to pass :

Could you please clarify why this is happening? Is the Maintainability check taking precedence here?

I was expecting the check Code Smells : 0 to fail the check

I found the solution. It turns out that the the condition I was looking for was “New Code Smells”

Thanks for the follow-up. We’ve done some work in newer versions of SonarQube to make this more obvious, so get to upgrading! SonarQube v7.9 LTS is an EOL version of SonarQube.

1 Like