[cppcheck]
apt = cppcheck
command = cppcheck -j{njobs} --quiet -f . | grep -vF 'cppcheck: error: could not find or open any of the paths given.'
# TODO: drop the filter when #769757 gets fixed

[deheader]
apt = deheader
match = *.c *.cc *.cxx *.cpp
comment = Check if your C/C++ code contains any unnecessary headers.
command = echo deheader

[include-what-you-use]
apt = iwyu
match =
 *.c *.cc *.cxx *.cpp
 *.h *.hh *.hxx *.hpp
command = include-what-you-use {file}

[flawfinder]
apt = flawfinder
command = flawfinder -Q -c .

[pmccabe]
apt = pmccabe
match = 
 *.c *.cc *.cxx *.cpp
 *.h *.hh *.hxx *.hpp
command = pmccabe {files} | sort -nr

[clang-modernize]
apt = clang-modernize-3.7 | clang-modernize-3.6 | clang-modernize-3.5 | clang-modernize-3.4
match =
 *.cc *.cxx *.cpp
 *.hh *.hxx *.hpp
comment =
 Please consider modernizing your C++ code with clang-modernize:
 http://clang.llvm.org/extra/clang-modernize.html
command = echo clang-modernize {files}

[-m64-m32]
match =
 *.c *.cc *.cxx *.cpp
 *.h *.hh *.hxx *.hpp
comment = You should almost never use -m64 and -m32 when compiling.
command = grep -rE -- '-m64|-m32' .

# TODO: pscan
# TODO: adlint
# TODO: sparse
# TODO: splint
# TODO: frama-c
# TODO: scan-build
# TODO: complexity #781946
# TODO: http://oclint.org/
# TODO: http://saturn.stanford.edu/
# TODO: https://scan.coverity.com/
# TODO: https://github.com/facebook/flint
# TODO: https://css.csail.mit.edu/stack/
# TODO: https://github.com/kframework/c-semantics
# TODO: shell metacharacter injection: g_spawn_command_line* system popen

# vim:ft=dosini
