1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
[cppcheck]
apt = cppcheck
# see Path::acceptFile etc in lib/path.cpp in cppcheck
# TODO: update it before releases:
# curl -s https://sources.debian.net/data/main/c/cppcheck/latest/lib/path.cpp |
# grep 'ext.* == "' |
# sed 's/.*"\([^"]*\)".*/\1/;s/^/ */'
files =
*.c
*.cpp
*.cxx
*.cc
*.c++
*.hpp
*.hxx
*.hh
*.tpp
*.txx
types = text/x-c text/x-c++
command = cppcheck -j{njobs} --quiet -f .
[deheader]
flags = manual
apt = deheader
files = *.c *.cc *.cxx *.cpp
types = text/x-c text/x-c++
comment =
Check if your C/C++ code contains any unnecessary headers.
Dangerous because it executes Makefiles
command = deheader
[include-what-you-use]
apt = iwyu
files =
*.c *.cc *.cxx *.cpp
*.h *.hh *.hxx *.hpp
types = text/x-c text/x-c++
command = include-what-you-use {file}
[flawfinder]
apt = flawfinder
# see maybe_process_file and c_extensions in the flawfinder script in flawfinder
# TODO: update it before releases:
# sed -n '/^c_extensions/,/ *}$/p' /usr/bin/flawfinder | sed "s/ *: *1 *,*/ /g;s/#.*//;s/'//g;s/\./*./g;s/ \+/ /g;s/.*[{}]//;s/\(.*\)/\L\1/;s/ *$//"
files =
*.c *.h
*.ec *.ecp
*.pgc
*.cpp *.cxx *.cc
*.cc *.c++
*.pcc
*.hpp
command = flawfinder -Q -c .
flags = fixme fixme-silent
[pmccabe]
flags = complexity
apt = pmccabe
files =
*.c *.cc *.cxx *.cpp
*.h *.hh *.hxx *.hpp
types = text/x-c text/x-c++
command = pmccabe {files} | sort -nr
[clang-check]
flags = manual
apt = clang
files =
*.c *.cc *.cxx *.cpp
*.h *.hh *.hxx *.hpp
types = text/x-c text/x-c++
comment =
because it can't be automatically run from `find -exec` due to the requirement for --
Please consider checking your code with clang-check:
http://clang.llvm.org/docs/ClangCheck.html
command = clang-check <files> --
[clang-tidy]
flags = manual
apt = clang-tidy
files =
*.c *.cc *.cxx *.cpp
*.h *.hh *.hxx *.hpp
types = text/x-c text/x-c++
command = clang-tidy '-checks=*' <files> --
comment = because it can't be automatically run from `find -exec` due to the requirement for --
[m64-m32]
files =
*.c *.cc *.cxx *.cpp
*.h *.hh *.hxx *.hpp
types = text/x-c text/x-c++
comment = You should almost never use -m64 and -m32 when compiling.
command = grep -nHrwE -- '-m64|-m32' .
[cbmc]
flags = todo
apt = cbmc
comment = needs to be a suggestion as it runs during a build
[vera]
flags = todo
comment = https://bitbucket.org/verateam/vera/overview
[nsiqcppstyle]
flags = todo
comment = https://code.google.com/p/nsiqcppstyle/
[cppclean]
flags = todo
comment = https://github.com/myint/cppclean/
[complexity]
flags = complexity
apt = complexity
files = *.c
types = text/x-c
command = complexity --no-load-opts {files}
[kwstyle]
flags = manual
apt = kwstyle
files =
*.c *.cc *.cxx *.cpp
*.h *.hh *.hxx *.hpp
comment =
Please consider checking your code with KWStyle:
https://kitware.github.io/KWStyle/resources/documentation.html
command = KWStyle -R -d .
[path-max]
files =
*.c *.cc *.cxx *.cpp
*.h *.hh *.hxx *.hpp
types = text/x-c text/x-c++
command = grep -nHwE 'PATH_MAX|MAXPATHLEN' {files}
comment =
You should not assume that paths are at most PATH_MAX characters long.
Some operating systems (e.g. Hurd) don't define PATH_MAX at all.
Others (e.g. Linux, OS X) define it, but don't enforce the limit.
[pscan]
apt = pscan
files =
*.c *.cc *.cxx *.cpp
*.h *.hh *.hxx *.hpp
types = text/x-c text/x-c++
command = pscan {files}
# TODO: adlint
# TODO: sparse
# TODO: http://repo.or.cz/w/smatch.git
# TODO: splint
# TODO: frama-c
# TODO: scan-build
# TODO: abi-compliance-checker
# TODO: http://oclint.org/
# TODO: http://saturn.stanford.edu/
# TODO: https://scan.coverity.com/
# TODO: https://github.com/facebookarchive/flint
# TODO: https://github.com/Krazy-collection/krazy
# TODO: https://css.csail.mit.edu/stack/
# TODO: https://github.com/kframework/c-semantics
# TODO: https://code.google.com/p/checkheaders/ https://github.com/cristeab/checkheaders
# TODO: https://github.com/danmar/ublinter
# TODO: https://cgit.kde.org/clazy.git/
# TODO: http://trust-in-soft.com/tis-interpreter/
# TODO: shell metacharacter injection: g_spawn_command_line* system popen
# vim:ft=dosini
|