From: Eric Bollengier Date: Mon, 11 Dec 2023 16:02:07 +0000 (+0100) Subject: regress: More work on cppcheck-test X-Git-Tag: Beta-15.0.1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64aad6eb3840de3297bbc41ef429ba7267305f23;p=thirdparty%2Fbacula.git regress: More work on cppcheck-test --- diff --git a/regress/tests/cppcheck-test b/regress/tests/cppcheck-test index b64d2f903..b73eae800 100755 --- a/regress/tests/cppcheck-test +++ b/regress/tests/cppcheck-test @@ -15,10 +15,19 @@ if [ "$TARGET" == ALL ]; then fi if [ "$TARGET" != "" ]; then + ret=0 cd .. git diff-tree --no-commit-id --name-only -r ${TARGET}..HEAD > /tmp/file.list.$$ if grep -E c$ /tmp/file.list.$$ > /dev/null then grep -E '[ch]$' /tmp/file.list.$$ | xargs cppcheck --quiet --enable=all --std=c++11 --force --suppress=unreadVariable --suppress=unusedFunction --suppress=cstyleCast --language=c++ + ret=$(($ret + $?)) fi + while read file; do + if file $file | grep Python > /dev/null ; then + pylint $file + ret=$(($ret + $?)) + fi + done < /tmp/file.list.$$ + exit $ret fi