Hello,
I am passing a code coverage report generated by OpenCppCoverage [0.9.9.0] to SonarQube 10.2. The report contains references to Windows external 3rd party libraries as I didn’t make use of the --excluded_sources
command line parameter.
E.g.
12:02:05.860 WARN: Cannot resolve the file path 'j\c3ipr\pr_1860_3_12_9\.short\6625a0\1\source_subfolder\libs\filesystem\src\codecvt_error_category.cpp' from the Cobertura coverage report
In order to prevent these kinds of warnings and avoid third party source code to be taken into consideration into the code coverage percentage I defined in sonar-project.properties
the following property following the syntax as per the ignore-code-coverage page:
# Exclude external references:
sonar.coverage.exclusions=**\commandtypeslib\**\*, **\configurationtypeslib\**\*, **\distributedloggingtypes\**\*, **\source_subfolder\**\*, **\vctools\**\*, **\externalapis\**\*, **\connextdds\**\*
I confirmed that the settings are in effect by looking at the log file
12:01:59.137 INFO: Excluded sources for coverage: **\commandtypeslib\**\*, **\configurationtypeslib\**\*, **\distributedloggingtypes\**\*, **\source_subfolder\**\*, **\vctools\**\*, **\externalapis\**\*, **\connextdds\**\*
however I am still getting the above warnings. Any suggestion on how to resolve this from the SonarQube configuration side will be appreciated.
Thx,
Simon-Pierre