[gjs: 2/3] CI: Run cpplint with --quiet
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 2/3] CI: Run cpplint with --quiet
- Date: Mon, 26 Mar 2018 01:21:12 +0000 (UTC)
commit 3ccb9ca3c37b83a24473d671d83bf72d795ed210
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Mar 25 00:08:22 2018 -0700
CI: Run cpplint with --quiet
Instead of chopping the summary off the cpplint output, we can run it
with --quiet. This causes the summary to be suppressed, but also messages
such as "Done processing foo.cpp" which would cause the job to error out
because of adding a line to the linter output if you added a new source
file, for example.
[skip cpplint] because some messages changed.
test/test-ci.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/test/test-ci.sh b/test/test-ci.sh
index 5740069..c630ca4 100755
--- a/test/test-ci.sh
+++ b/test/test-ci.sh
@@ -207,15 +207,15 @@ elif [[ $1 == "CPPCHECK" && "$log_message" != *'[skip cppcheck]'* ]]; then
elif [[ $1 == "CPPLINT" && "$log_message" != *'[skip cpplint]'* ]]; then
echo
echo '-- Lint report --'
- cpplint $(find . -name \*.cpp -or -name \*.c -or -name \*.h | sort) 2>&1 | \
- tee "$save_dir"/cpplint/current-report.txt | sed -E 's/:[0-9]+:/:LINE:/' | head -n -1 >
/cwd/current-report.txt
+ cpplint --quiet $(find . -name \*.cpp -or -name \*.c -or -name \*.h | sort) 2>&1 | \
+ tee "$save_dir"/cpplint/current-report.txt | sed -E 's/:[0-9]+:/:LINE:/' > /cwd/current-report.txt
cat "$save_dir"/cpplint/current-report.txt
echo
# Get the code committed at upstream master
do_Get_Upstream_Master
- cpplint $(find . -name \*.cpp -or -name \*.c -or -name \*.h | sort) 2>&1 | \
- tee "$save_dir"/cpplint/master-report.txt | sed -E 's/:[0-9]+:/:LINE:/' | head -n -1 >
/cwd/master-report.txt
+ cpplint --quiet $(find . -name \*.cpp -or -name \*.c -or -name \*.h | sort) 2>&1 | \
+ tee "$save_dir"/cpplint/master-report.txt | sed -E 's/:[0-9]+:/:LINE:/' > /cwd/master-report.txt
echo
# Compare the report with master and fail if new warnings are found
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]