[gjs: 24/26] CI: Discard stdout of cpplint
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 24/26] CI: Discard stdout of cpplint
- Date: Sun, 14 Apr 2019 14:05:23 +0000 (UTC)
commit 1d167cc85813515deba0f05249343cd9833aada2
Author: Philip Chimento <philip chimento gmail com>
Date: Wed Mar 27 22:22:45 2019 -0700
CI: Discard stdout of cpplint
It turns out that mixing stderr and stdout of cpplint is not a good idea
as it will occasionally intermix "Done processing foo.cpp" lines on
stdout, with linter error lines on stderr. When one such linter error is
eliminated, the stdout line will be intermixed with a different stderr
line, causing a spurious "new" error to appear.
We redirect stdout to /dev/null to just avoid the "Done processing" and
"Total errors found" lines altogether.
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 bb0436bd..1f10ce15 100755
--- a/test/test-ci.sh
+++ b/test/test-ci.sh
@@ -250,18 +250,18 @@ elif [[ $1 == "CPPCHECK" && "$log_message" != *'[skip cppcheck]'* ]]; then
elif [[ $1 == "CPPLINT" && "$log_message" != *'[skip cpplint]'* ]]; then
do_Print_Labels 'C/C++ Linter report '
- cpplint --quiet $(find . -name \*.cpp -or -name \*.c -or -name \*.h | sort) 2>&1 | \
+ cpplint --quiet $(find . -name \*.cpp -or -name \*.c -or -name \*.h | sort) 2>&1 >/dev/null | \
tee "$save_dir"/analysis/current-report.txt | \
- sed -E -e 's/:[0-9]+:/:LINE:/' -e 's/Total errors found: [0-9]+//' -e 's/ +/ /g' \
+ sed -E -e 's/:[0-9]+:/:LINE:/' -e 's/ +/ /g' \
> /cwd/current-report.txt
cat "$save_dir"/analysis/current-report.txt
echo
# Get the code committed at upstream master
do_Get_Upstream_Master "cppLint"
- cpplint --quiet $(find . -name \*.cpp -or -name \*.c -or -name \*.h | sort) 2>&1 | \
+ cpplint --quiet $(find . -name \*.cpp -or -name \*.c -or -name \*.h | sort) 2>&1 >/dev/null | \
tee "$save_dir"/analysis/master-report.txt | \
- sed -E -e 's/:[0-9]+:/:LINE:/' -e 's/Total errors found: [0-9]+//' -e 's/ +/ /g' \
+ sed -E -e 's/:[0-9]+:/:LINE:/' -e 's/ +/ /g' \
> /cwd/master-report.txt
echo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]