Will not fail when below quality gate

The screenshot shows that the “Minimal Way” quality gate is selected, the test coverage is below 50% (46.7), and the status as passing the quality gate. I need this insufficient coverage to break the build. I have tried deleting and regenerating the job (from Jenkins). I have also explored the possibility that it is only considering ‘new’ code by adding more uncovered code but that ‘—’ over “Coverage on New Code” remained. I am stumped so I hope someone can help. I am using SonarQube version Version 5.6.3, sonarqube-scanner version 2.4.0 and Gulp 4.0.0 for reporting. Thanks in advance!

Update: Found this issue. For our ‘Condition’ we were using “Overall Coverage” which we have always used for our java projects and works fine. With this project being our first TypeScript project to use SonarQube, we find that “Coverage” must be selected.

Does that mean Java needs “Overall Coverage” while TypeScript needs “Coverage”?


You shouldn’t need to include two different metrics in your QG to get uniform results from language to language but we’ve made some adjustments to metrics since 5.6.3, which is 2.5 years old.

The current version of SonarQube is 7.7 and the current LTS is 6.7.6 (7.9 LTS is coming…). You should really consider upgrading at your earliest convenience.