diff options
-rwxr-xr-x | tools/ci/jobs/cpplint.sh | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/tools/ci/jobs/cpplint.sh b/tools/ci/jobs/cpplint.sh index c8e709fbe..d9ccf92c8 100755 --- a/tools/ci/jobs/cpplint.sh +++ b/tools/ci/jobs/cpplint.sh @@ -47,20 +47,24 @@ args+=("--filter=\ -build/c++tr1"\ ) +# Cannot find a good way to handle execution errors +# (such cpplint.py demanding a version of Python that does not exist) +# So use || true here and assume any other problems will be exposed +# by the grep below. find src \ -type f \ - -name "*.cpp" -o -name "*.hpp" -o -name "*.h" -o -name "*.cc" \ - -exec ./cpplint.py "${args[@]}" {} \+ 2>"$ERRFILE_UNFILTERED" \ - || { cat "$ERRFILE_UNFILTERED"; exit 1; } + \( -name "*.cc" \ + -o -name "*.cpp"\ + -o -name "*.h" \ + -o -name "*.hpp" \ + \) -exec ./cpplint.py --verbose=5 "${args[@]}" {} \+ 2>"$ERRFILE_UNFILTERED" \ + || true # If grep does not find any messages, it exits non-zero. Therefore, use ||true -grep ": " "$ERRFILE_UNFILTERED" \ - | grep -v -e "src/debug/" \ - -e "unittests/doctest.h" \ - -e "unittests/catch.hpp" \ - -e "debug/fast_mutex" \ - -e "sdl2gfx/SDL2" \ - >${ERRFILE} || true +grep -v -e "^src/debug/nvwa/debug_new.cpp" \ + -e "^src/unittests/doctest.h" \ + -e "^src/unittests/catch.hpp" \ + < "$ERRFILE_UNFILTERED" > "$ERRFILE" || true run_check_warnings |