0
votes

I'm using SonarQube 4.2.1 for analyzing maven projects and I'd like to fail the quality gate when the number of issues is higher than the last successful analysis (QG was green).

I'm aware of Fail SonarQube quality gate when coverage decreases but it does not cover all my needs, because the QG would be green also, when build #1 has 5 issues (with QG green), build #2 8 issues and build #3 has 7 issues, which is less than the last analysis but still more than last successful build #1.

Any idea how to do this?

1

1 Answers

0
votes

You just have to add the following condition:

  • Metric: "New issues"
  • Delta since previous analysis
  • "Is greater than"
  • "0" in error