Must-share information (formatted with Markdown):
- Sonarqube Community Edition v7.6; SonarScanner 184.108.40.2062
- Scan a monorepo project with multiple sub-projects and include their generated coverage
I have a monorepo project successfully being scanned for static analysis in SQ. Please note, all sub-projects live in the
projects folder, but not all have unit tests.
I also have unit tests being run before scan, and have successfully produced
lcov.info files. Note, these files are 1 per sub-project.
My sonar-project.properties file is as follows:
I can see in the debug trace for the scanner that file appears to be found (no error), but nothing further seems to happen:
An example lcov.info file looks like this:
TN: SF:projects/admin2/src/polyfills.ts FNF:0 FNH:0 DA:62,1 DA:63,1 DA:64,1 DA:65,1 DA:71,1 LF:5 LH:5 BRF:0 BRH:0 end_of_record TN: SF:projects/admin2/src/test-common.ts FNF:0 FNH:0 DA:9,1 DA:11,1 DA:20,1 LF:3 LH:3 BRF:0 BRH:0 end_of_record ...(more data)
I can confirm via the index.html generated by the tests that there is in fact coverage happening.
I can’t tell why the coverage is showing as 0%. There are no errors output.