I'm working on integration of cpp-check into CI pipeline. I have a large
project, with automatically generated compile_commands.json. For my use
case I need to check small number of files.
I can use the "--project" to get the correct build flag for each file, but
that will trigger check on all files. I can use the list of named files -
but that forces passing the required-I/-D for each file. Is there a way to
achieve both:
* Run cppcheck on list of files.
* Retrieve the -D/-I/etc from the compile_commands.json
This can be implemented using wrapper scripts (python, jq, ...) - but it
feels that it should be better for cppcheck to support this combination of
build. It will also make integration with with other tools
(vim/emacs/vscode/...) easier.
Hi,
I'm working on integration of cpp-check into CI pipeline. I have a large
project, with automatically generated compile_commands.json. For my use
case I need to check small number of files.
I can use the "--project" to get the correct build flag for each file, but
that will trigger check on all files. I can use the list of named files -
but that forces passing the required-I/-D for each file. Is there a way to
achieve both:
* Run cppcheck on list of files.
* Retrieve the -D/-I/etc from the compile_commands.json
This can be implemented using wrapper scripts (python, jq, ...) - but it
feels that it should be better for cppcheck to support this combination of
build. It will also make integration with with other tools
(vim/emacs/vscode/...) easier.
Looking for feedback.
Yair
There's a WIP PR but I keep getting side tracked by more pressing stuff. See https://github.com/danmar/cppcheck/pull/6754