Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 1.53 KB

README.md

File metadata and controls

22 lines (14 loc) · 1.53 KB

Static Analysis Helper Scripts

A few scripts that can be helpful in the use and evaluation of C++ static analysis tools.

A blog post describing the use of these scripts with cppcheck and clang can be found here.

Script Description
cc_cppcheck.sh Iterates over a compilation database (compile_commands.json) file, and executes cppcheck.sh on each file.
cc_clangtidy.sh Iterates over a compilation database (compile_commands.json) file, and executes clang-tidy on each file.
cc_pvs.sh Wrapper for PVS-Studio.
cc_driver.pl 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.
cppcheck.pl Invokes cppcheck defining a number of common parameters, also generates and includes compiler pre-defined macros.

Several of the scripts are written in Perl, simply because that was easiest (especially given the excellent debugging support available under Eclipse with EPIC).

The scripts have been tested on CentOS 6, CentOS 7 and Ubuntu 20.04.

Copyright 2021 by Bill Torpey. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 United States License. http://creativecommons.org/licenses/by-nc-nd/3.0/us/deed.en