-
Notifications
You must be signed in to change notification settings - Fork 365
sonar.cxx.jsonCompilationDatabase.analyzeOnlyContainedFiles
Günter Wirth edited this page Jan 23, 2023
·
4 revisions
Defines the mode for sonar.cxx.jsonCompilationDatabase.
- With
sonar.cxx.jsonCompilationDatabase.analyzeOnlyContainedFiles = False(default), all files configured viasonar.projectBaseDirare analyzed (independent if they are in the 'JSON Compilation Database' or not) and only the configuration (INCLUDES, MACROS) is read from the 'JSON Compilation Database'. - If
sonar.cxx.jsonCompilationDatabase.analyzeOnlyContainedFiles = Trueis used, the analyzed files will be limited to the files contained in the 'JSON Compilation Database' file - the intersection of the files configured viasonar.projectBaseDirand the files contained in the 'JSON Compilation Database' file.
Hints:
- In case you are using header files to include .CPP files you have to use
analyzeOnlyContainedFiles=Falseto get a complete result. Source files included in header files are not listed in the 'JSON Compilation Database' and are ignored.analyzeOnlyContainedFiles=True: Unfortunately, the sensor cannot control the indexing of the source files. Therefore, all files that belong to language CXX and are located within the directorysonar.projectBaseDirare loaded onto the server, but are no longer analyzed, which saves time.