# Code coverage not taking gcov while sonar-scanner is running

**URL:** <https://community.sonarsource.com/t/code-coverage-not-taking-gcov-while-sonar-scanner-is-running/88117>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube, scanner, coverage\
**Created:** [March 28, 2023, 6:41am UTC](https://community.sonarsource.com/t/code-coverage-not-taking-gcov-while-sonar-scanner-is-running/88117 "2023-03-28T06:41:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdatt1989](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@cdatt1989](https://community.sonarsource.com/u/cdatt1989)\
**Post date:** [March 28, 2023, 6:41am UTC](https://community.sonarsource.com/t/code-coverage-not-taking-gcov-while-sonar-scanner-is-running/88117/1 "2023-03-28T06:41:07Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)  
SonarQube version 9.9
- how is SonarQube deployed: zip, Docker, Helm  
zip
- 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.build-wrapper-output=worker/bw-output -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.host.url=xxxx -Dsonar.login=xxx  
**Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!**

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [March 29, 2023, 9:26am UTC](https://community.sonarsource.com/t/code-coverage-not-taking-gcov-while-sonar-scanner-is-running/88117/2 "2023-03-29T09:26:13Z")

</div>

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?

> [@How to find logs about importing code coverage](https://community.sonarsource.com/t/how-to-find-logs-about-importing-code-coverage/73317/):
>
> When coverage data isn’t appearing as expected in SonarQube Server / Community Build or SonarQube Cloud, the first place you should look is the scanner logs. Where do I find the scanner logs?warning This will likely be broken out into its own guide soon The Scanner logs are the output of executing one of the [scanners](https://docs.sonarqube.org/latest/analysis/overview/), either directly or wrapped by one of many integrations, such as the [SonarScanner for Jenkins](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-jenkins/), [SonarScanner for Azure DevOps](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-azure-devops/), [SonarQube](https://github.com/SonarSource/sonarqube-scan-action)/[SonarCloud](https://github.com/marketplace/actions/sonarcloud-scan) GitHub Actions or [SonarQube](https://bitbucket.org/sonarsource/sonarqube-scan/src/master/) /…

---

<div class="post-metadata">

**Author:** ![cdatt1989](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@cdatt1989](https://community.sonarsource.com/u/cdatt1989)\
**Post date:** [March 30, 2023, 7:39am UTC](https://community.sonarsource.com/t/code-coverage-not-taking-gcov-while-sonar-scanner-is-running/88117/3 "2023-03-30T07:39:49Z")

</div>

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.
