Does sonar scanner require a test coverage report?

SonarQube 8.9
Scanner version 4.6.2

I’m trying to run a scan that simply does a code analysis, I would like to exclude the upload of a test coverage report.

I have successfully run the scanner after creating a test report. However this fails if the scanner cannot find a coverage report to upload. Is there anyway to tell the scanner to ignore test coverage and just do static code analysis?


I confirm it’s possible to just run the code scan part and it should not fail if a coverage report is not provided. This is actually the default behavior and what users do when they start with SonarQube and then only they configure their CI job to load coverage reports once they are satisfied with the static code analysis results.

Can you share some details about what you did to run your code scan?
It would help if you could share the logs showing the failure you are facing.


Ah it takes a fresh brain sometimes to see the wood for the trees, you are correct, my file included the following 2 lines:


Once removed then all is running fine, thank you for pointing me back to check the configuration.

1 Like