No coverage data seen when Sonar Cloud pulls coverage data from GitHub


We have integrated Sonar Cloud with our GitHub repo.

I have a GitHub repository that has some java script code (server side) , file and code coverage report in file.

I have SonarQube Scanner installed on my laptop and when i run the following command I see the coverage report in Sonar Cloud
sonar-scanner -Dsonar.projectKey=xxxxx -Dsonar.organization=xxxxx -Dsonar.login=72xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx64c

However when the SonarCloud picks up content from GitHub and analyzes there is no coverage report. Can someone please help me understand what I am missing?

The coverage info file in my laptop and Git repo are the same. I have also made sure that there is no absolute paths in file.

The contents of files is provided below

# Path to sources




# Path to tests




# Source encoding


# Exclusions for copy-paste detection


sonar.javascript.lcov.reportPaths= coverage/



And welcome to the community forum!

Since you have a file in your repo, that means you are using our Autoscan feature to analyze your project when you push things to Github.

You issue is that Autoscan currently doesn’t support coverage, you can find a list of limitations of the service here.

So you have the coverage when you local execute the scanner, but then it’s overwritten when you push to Github and Autoscan sends it’s analysis.

If you want to have coverage information when you push to Github you will need to use a different service than Autoscan, like Travis CI or Circle CI for exemple.

Hi Gregoire Aubert,

Thank you for your response and for pointing out that it is a limitation of Auto Scan feature. It would be great to have this feature.

Is it possible to use Auto Scan feature and use sonar-scanner command line to only push coverage info to Sonar Cloud? I want to leverage both .


Yeah it would really be nice and we didn’t start any work yet on this subject but that’s something we want to support too.

I’m sorry but I don’t think that’s possible in the current way things work, running the scan with AutoScan will always erase the coverage you got from the sonar-scanner.