Hi,
I’m new to SQ and trying to setup scans for our C++ project.
SQ server: 9.9.0.65466
Sonar scanner: 4.7.0.2747
Deployed as a zip
The setup of the projects is:
c:\source\Libs
c:\source\Application1
c:\source\Application2
c:\source\Application3
All 3 applications are using the same source code from Libs.
Cmake configuration and build parameters are setup in c:\source\Libs. All applications are built from c:\source\Libs directory
Currently I have 4 scanning jobs: ‘Libs’ only and then one for each application.
Each application has test files which are mixed in with source code. I’ve created a sonar.exclusion pattern to exclude those files but
when the scan is executed the files are not being excluded. When I look at the scan results on the server I get Duplicate rate 29.9% all based on
the files that are suppose to be excluded.
Here is the sample of property file
sonar.sources=c:/source/application1/
sonar.projectBaseDir=C:/source/application1/
sonar.exclusions=C:/source/application1/test/*,C:/source/application1/test/approved/*,C:/source/application1/mock/*,C:/source/application1/**/**/**/*.html
The following information is logged:
INFO: Project configuration:
INFO: Excluded sources: C:/source/application1/test/*, C:/source/application1/test/approved/*, C:/source/application1/mock/*, C:/source/application1/**/**/**/*.html
INFO: 924 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
Are there any additional parameters I need to include to exclude test files from being scanned?
I’ve tried using the command line rather than property file, and simplifying the exclude to a single directory. I’ve also confirmed the path is correct, and it’s the same format as my projectBaseDir, which is getting picked up correctly.
Thanks