diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-04-05 00:16:28 +0200 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-04-05 00:16:28 +0200 |
commit | 4c7fe640ab9ca17fff5bee31e1965706d57f204b (patch) | |
tree | efb8cfd117e91a20306697ec4ec89f7e6f383174 | |
parent | 65f505ea28f29738e4d874f55d96d6e2579ba757 (diff) | |
download | manaplus-4c7fe640ab9ca17fff5bee31e1965706d57f204b.tar.gz manaplus-4c7fe640ab9ca17fff5bee31e1965706d57f204b.tar.bz2 manaplus-4c7fe640ab9ca17fff5bee31e1965706d57f204b.tar.xz manaplus-4c7fe640ab9ca17fff5bee31e1965706d57f204b.zip |
Save cpplint processing time by excluding generated files instead of filtering results.
-rwxr-xr-x | tools/ci/jobs/cpplint.sh | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tools/ci/jobs/cpplint.sh b/tools/ci/jobs/cpplint.sh index d9ccf92c8..b8331ff29 100755 --- a/tools/ci/jobs/cpplint.sh +++ b/tools/ci/jobs/cpplint.sh @@ -50,21 +50,16 @@ args+=("--filter=\ # 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. +# by the grep below. Addendum: no more grep. YMMV. find src \ -type f \ \( -name "*.cc" \ - -o -name "*.cpp"\ - -o -name "*.h" \ - -o -name "*.hpp" \ - \) -exec ./cpplint.py --verbose=5 "${args[@]}" {} \+ 2>"$ERRFILE_UNFILTERED" \ - || true + -o \( -name "*.cpp" -a \! -path src/debug/nvwa/debug_new.cpp \) \ + -o \( -name "*.h" -a \! -path src/unittests/doctest.h \) \ + -o \( -name "*.hpp" -a \! -path src/unittests/catch.hpp \) \ + \) -exec ./cpplint.py --verbose=5 "${args[@]}" {} \+ 2>"$ERRFILE" + #|| true -# If grep does not find any messages, it exits non-zero. Therefore, use ||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 |