## QUALITY GATE STATUS
Conditions on New Code
### Failed
## FAILED CONDITION
0.0%
Coverage on New Codeis less than 80.0%
## MEASURES
[0]New Bugs
Reliability[A]
[0]New Vulnerabilities
Security[A]
[0]
Security Review[A]
[9]New Code Smells
Maintainability[A]
[0.0%]Coverage on [50] New Lines to cover
0.0%Estimated after merge
[0.0%]Duplications on [62]New Lines
Right. If there are no new lines to cover then… they don’t need to be covered. In fact, you’ll see this behavior for up to 20 new lines of code; a coverage on new code condition in your Quality Gate will only kick in when you have >20 new lines of code.
You’ve added the key in what needs to be a key/value pair. It should be -Dsonar.coverage.jacoco.xmlReportPaths=[path to report].
It should be -Dsonar.coverage.jacoco.xmlReportPaths=[path to report] .
I am not sure about the [path to report]` given in properties, Could you please explain me how its works and the process of sonar.coverage.jacoco. property.
Do we need any dependency needed on pom.xml or any other places for coverage Jacoco.
PFA screenshots
In the quality gate condition for coverage is greater than 80, Since no new lines are covered in the Coverage, its shows 0. Hence, Quality gate is failed.
Actually, it looks like you’re almost there. Generally, when you provide paths for analysis parameters, you’re going to provide paths from project root so probably not
assuming your report really is in your project root.
That’s actually a question of generating your analysis report, which is not my area of expertise. But I don’t believe you need to modify your pom for this.
That’s a different problem, and one external to SonarQube. In general, you should take the same steps to generate this report for PRs that you do for analysis of the main branch.