Closed tkittel closed 6 months ago
Of course, we can also investigate other checkers, e.g. llvm based.
CMake is able to export all the compiled commands in a json file:
https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html
And according to their manual cppcheck (and, I believe, also clang-tidy https://clang.llvm.org/docs/JSONCompilationDatabase.html) can use this as input. It might be worthwhile to simply optionally generate such .json files.
We now have CI covering all of our simple-build-based open source repos with cppcheck.
This is obviously useful, and now we are in conda envs, it might not be so difficult:
https://cppcheck.sourceforge.io/manual.pdf
cppcheck myfile.c
There is a conda-forge package.