summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2025-04-07 21:04:02 +0000
committerFedja Beader <fedja@protonmail.ch>2025-04-07 21:04:02 +0000
commit315588b76204ca3dfe15ac29b1e896b85f6c808d (patch)
treed477f0241add29d7659dc59e35c8138240e70d3e
parentbd5a30eaaf29ba676a9300b80e89ccf218d964dd (diff)
downloadmv-315588b76204ca3dfe15ac29b1e896b85f6c808d.tar.gz
mv-315588b76204ca3dfe15ac29b1e896b85f6c808d.tar.bz2
mv-315588b76204ca3dfe15ac29b1e896b85f6c808d.tar.xz
mv-315588b76204ca3dfe15ac29b1e896b85f6c808d.zip
Save cpplint processing time by excluding generated files instead of filtering results.HEADmaster
**** mana/plus!158
-rwxr-xr-xtools/ci/jobs/cpplint.sh17
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