diff --git a/scripts/cppcheck.sh b/scripts/cppcheck.sh index 24dc755..42f5183 100755 --- a/scripts/cppcheck.sh +++ b/scripts/cppcheck.sh @@ -13,10 +13,13 @@ check_dir=$SRCDIR/../src main() { FAIL=0; - RESULT=$(cppcheck $check_dir --quiet --suppress=missingIncludeSystem --suppress=unusedFunction --enable=all -i $exclude_dir 2>&1) - if [ ! -z "$RESULT" ]; then - echo "$RESULT" + { ERROR="$( { cppcheck $check_dir --suppress=missingIncludeSystem --suppress=unusedFunctionf --enable=all -i $exclude_dir; } 2>&1 1>&3 3>&- )"; } 3>&1; + + if [ ! -z "$ERROR" ]; then + echo "----------------------------------" + echo "$ERROR" + echo "----------------------------------" fail "Cppcheck finished with error" fi }