Code coverage not taking gcov while sonar-scanner is running

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube version 9.9
  • how is SonarQube deployed: zip, Docker, Helm
  • what are you trying to achieve
    need to get coverage report of gcov
  • what have you tried so far to achieve this
    sonar-scanner -X -Dsonar.cfamily.threads=8 -Dsonar.cfamily.cache.enabled=false -Dsonar.cfamily.gcov.reportPaths=src/gcov_files -Dsonar.projectKey=“Project:CPP” -Dsonar.projectName=Project -Dsonar.sources=src -Dsonar.projectVersion=1.0 -Dsonar.login=xxx
    Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Okay. What happens after? You’ll need to share more than just the analysis command – does some coverage get reported? None at all? What do the logs say?

Hi Colin, Thanks for your valuable response. The issue got resolved. I was doing a silly spelling mistake
Instead of sonar.cfamily.gcov.reportsPath I was using *sonar.cfamily.gcov.reportPaths parameter. Also there was no error occurring during the sonar scan for incorrect parameter.

1 Like