Must-share information (formatted with Markdown):
- SonarQube version: 10.0.0.68432
- Scanner version: 4.8.0.2856
- View results of code coverage report without importing Java source files
- Uploaded XML Report generated by Jacoco without importing sources, results in ‘0%’ coverage
I am currently trying to view XML coverage reports generated by Jacoco on SonarQube but am running into an issue with satisfying the sonar.sources
property of the Sonar Scanner.
I understand that this property is necessary for offering features such as line highlighting, but the issue is my team works on several releases of source code and it becomes impractical to have the source files downloaded to the correct project directory. Further, since Jacoco generates XML reports using .exec
data, inaccurate coverage percentages may be displayed if the release of the source files imported to Sonar differ from the class files Jacoco used during report generation.
Hence, I was wondering if there was any way to view coverage metrics included in Jacoco’s reports without importing source files. For example, the html
report generated by Jacoco will display a coverage percentage even if source files are not provided. My team is willing to not leverage the Code
portion of the Project menu as we find the actual SonarQube dashboard very useful. Thank you.