I’m scanning a java project with maven sonar scanner and it’s picking up the jacoco coverage report but coverage in jacoco in 23% where as in sonarqube it showing as 34.8%, Why there is difference in the coverage?
Colin
(Colin)
July 5, 2023, 10:01am
2
I suggest finding a specific discrepancy between the report (a file, for example) and sharing the information (screenshots, information).
Also take a look at this guide:
Problem you have
Your JaCoCo coverage is not the same on SonarQube/SonarCloud than it is on JaCoCo
Check the following
It might be expected because you are not looking at the right metrics. Read more about this in the SonarQube and code coverage guide.
Your project has more than only Java/Kotlin/Scala code so when aggregated, coverage results might differs than only Java code coverage.
If you are using Lombok, make sure that you have the right configuration using the Getting meaningful cove…