-
Notifications
You must be signed in to change notification settings - Fork 365
Open
Description
The cxx plugin is using an preprocessor to handle the #include files. The preprocessor is searching in the sonar.cxx.includeDirectories paths for include files.
Up to now there is no possibility to exclude #includes. This could sometimes help to speed-up the analysis. Idea is to introduce a configuration setting similar to sonar.exclusions for include files only:
- completely ignore some header files or directories in the preprocessor
- comma separated list of items
- directories, filenames, file extensions with/without wildcards
- using ANT patterns
configuration key:
sonar.cxx.preprocessor.exclusions=...- Hint: Especially with
sonar.cxx.msbuild.reportPathsandsonar.cxx.jsonCompilationDatabase, weresonar.cxx.includeDirectoriesis automatically generated, this could help.
Patterns
Paths are relative to the project base directory. The following wildcards can be used:
*- Match zero or more characters**- Match zero or more directories?- Match a single character
Other related configuration options
File extensions should be used for the cxx language are defined with:
sonar.cxx.file.suffixes=...The source file root, additional inclusions and exclusions are defined with below settings (these are the files later on be visible in the UI):
sonar.sources=...
sonar.inclusions=...
sonar.exclusions=...