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
|
#!/bin/bash
# To filter on a specific problem:
# scripts/cppcheck-rg 2>&1 | grep noCopyConstructor
# On a specific file:
# scripts/cppcheck-rg 2>&1 | grep SoundDriver
# We can add "-j `nproc`" and this will run *really* fast, however the
# unusedFunction check is not supported with -j so I've left it out.
SRC=$1
if [ -z "$SRC" ]
then
SRC=src
fi
SRCPATH=`realpath $SRC`
cppcheck --language=c++ --std=c++14 --library=qt.cfg --quiet \
--enable=all --inconclusive --check-level=exhaustive \
--inline-suppr --suppress=useStlAlgorithm \
--suppress=missingInclude --suppress=missingIncludeSystem \
--suppress=stlFindInsert \
-DHAVE_ALSA -DHAVE_LIBJACK -DHAVE_LIBSNDFILE -DHAVE_LILV -DHAVE_GTK2 \
-DHAVE_LIRC \
-I$SRCPATH \
$SRCPATH
|