-
Command used: sonar-scanner
-
The project is written in C++
-
Our project has this directory structure
top_level_directory/other_project_code
top_level_directory/project/sub_project_1
top_level_directory/project/sub_project_2
- We use
cmake
to generate acompile_commands.json
intop_level_directory
forsub_project_2
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 project/sub_project_2
-
The sonar-scanner runs in
top_level_directory
so it can seeother_project_code
andproject
-
The
sonar-project.properties
contains these settings and is intop_level_directory
sonar.sources=project/sub_project_1/source,project/sub_project_2/source,other_project_code/source
sonar.cfamily.compile-commands=compile_commands.json
-
The
compile_commands.json
does contain file names inside ofother_project_code/source
-
After the sonar-scanner runs, the analysis results don’t show any code from inside of
other_project_code/source
-
I have also tried compiling both
sub_project_1
andsub_project_2
fromtop_level_directory
with the Sonar build wrapper and still did not see any code fromother_project_code/source
in the analysis -
I am not sure where to go from here, possibly adding the
sonar.include
setting? Any help is much appreciated. Thank You