Static Analysis Helper Scripts
A few scripts that can be helpful in the use and evaluation of C++ static analysis tools.
|Script to build cppcheck for installation in a non-standard location (i.e., not /usr, /usr/local).
|Iterates over a compilation database (compile_commands.json) file, and executes a specified command for each build target, passing the compiler flags from the normal build.
|Invokes cppcheck defining a number of common parameters, also generates and includes compiler pre-defined macros.
|Takes (filtered or un-filtered) output from cppcheck, and formats it in csv format.
|Takes (filtered or un-filtered) output from clang tools (clang-check and clang-tidy), and formats it in csv format.
|Takes a list of error annotations from ITC benchmark suite, and formats it in csv format.
|Takes a list of error annotations from PVS-Studio, and formats it in csv format.
|Example script used to run PVS-Studio against ITC benchmarks.
Most of the scripts are written in Perl, simply because that was easiest (especially given the excellent debugging support available under Eclipse with EPIC). Plus, I kind of like Perl, as I’ve mentioned before.
The scripts have been tested on CentOS 6.