I want my project to fail if the code coverage on new code is not 70%.
Therefore, I set Coverage on New Code
to 70% in Quality Gates
.
I analyse code that has 84.1% coverage. Then I add some files which don't have test coverage and the coverage drops to 58%.
So obviously, the coverage on new code is not 70%.
Despite this, Quality Gates
is Passed
and Coverage on New Code
is -
My project is in Scala, I'm using Maven as the build tool and Scoverage for test coverage.
Why doesn't SonarQube see the coverage on new code?