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-3.0.3.778
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:
Thanks
Akhil