]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: More work on cppcheck-test
authorEric Bollengier <eric@baculasystems.com>
Mon, 11 Dec 2023 16:02:07 +0000 (17:02 +0100)
committerEric Bollengier <eric@baculasystems.com>
Tue, 13 Feb 2024 09:36:03 +0000 (10:36 +0100)
regress/tests/cppcheck-test

index b64d2f903e8491ce6cefb22556a8d812bee147aa..b73eae80061a14faaaab313ee2ae3f0f8ba27d9b 100755 (executable)
@@ -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