Issue with population of coverage on new code for C/C++ applications

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube Version: 6.7.3(Build Number: build 38370)
    Scanner: sonar-scanner-cli-
    SCM: GIT

  • what are you trying to achieve
    Code Coverage on new code for C/C++ application

  • what have you tried so far to achieve this
    a. Configured ‘PROJECT_DATE’ parameter whose value is passed to SonarQube via ‘sonar.projectDate’ parameter when first scan is done on baseline source code to generate the SonarQube report. ‘PROJECT_DATE’ parameter is not passed in subsequent/next scan done via SonarQube client in Jenkins.
    b. Able to successfully populate total code coverage for C/C++ applications with total coverage increasing from 9.4%(baseline source code) to 16.9%(new release source code).
    c. Able to achieve total coverage and coverage on new code for Java and .NET applications using the same ‘PROJECT_DATE’ configuration steps as described in point ‘a’ above.

For your reference, Please find attached:
a. SonarQube Code Coverage Report

b. Jenkins SonarQube Coverage Configuration:



Welcome to the community!

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

6.7.3 → 7.9.6 → 8.9.9 → 9.6 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.