Amount of issues found with eclipse is different than with cpptestcli
When we analyze our code from Eclipse we use the compile_commands.json file as input. Then we click on the project name and start the analyzation.
When we use cpptestcli on terminal the build_commands.json file is also used as input. We set the -workspace argument and the ruleset which should be used.
The result is different concerning the found issues. The eclipse plugin handles the input scope in anotehr way and therefore more issues will be found. I know tha we can scope the input more with -module parameters and so on. But what will be the easiest solution to get the same results from cppptestcli as the eclipse plugin does? I am not achieving the same amount of issues with the cpptestcli call with parameters as the eclipse plugin does. What should i do?
Did you have a chance to examine the differences in results between Eclipse and CLI? Is it perhaps that Eclipse runs find violations in header files where CLI does not report them?
If it is so, I would add "-module proj-root" option to the CLI run with "proj-root" pointing to the root folder of your project (corresponding to the top-level node in your Eclipse project). See if it helps, otherwise we will look further.0
@Bogdan Czwartkowski thanks a lot that fixed it. Nevertheless i share my investigation results.
Indeed there are header files involved. I tried some differnet cpptestcli calls from the Project folder.
Project is structed like this:
1) Eclipse ==> 96 files are checked
2) cpptestcli with -module internal=./src -module external=./external_libs -module DemoApp=./DemoApplications ==> 50 files checked
3) cpptestcli with -module ==> 96 files checked
1 and 3 have the same issue amount.
Puh, i tried so many cpptestcli parameters that it seems i missed the obvious solution. Sorry for the noise.0
Many thanks for the update. And no need to be sorry, this is what the forum is for0