Commit b1b9f3b9 authored by Philip Chimento's avatar Philip Chimento Committed by Chun-wei Fan

CI: Remove "Total errors found" line from cpplint output

The newly built Docker image must have gotten a newer version of cpplint
which prints a total error count at the end. We need to remove this line
or the error counts will be flagged as a diff in the linter output.
parent 6c00884d
......@@ -251,14 +251,18 @@ 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 | \
tee "$save_dir"/analysis/current-report.txt | sed -E -e 's/:[0-9]+:/:LINE:/' -e 's/ +/ /g' > /cwd/current-report.txt
tee "$save_dir"/analysis/current-report.txt | \
sed -E -e 's/:[0-9]+:/:LINE:/' -e 's/Total errors found: [0-9]+//' -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 | \
tee "$save_dir"/analysis/master-report.txt | sed -E -e 's/:[0-9]+:/:LINE:/' -e 's/ +/ /g' > /cwd/master-report.txt
tee "$save_dir"/analysis/master-report.txt | \
sed -E -e 's/:[0-9]+:/:LINE:/' -e 's/Total errors found: [0-9]+//' -e 's/ +/ /g' \
> /cwd/master-report.txt
echo
# Compare the report with master and fail if new warnings are found
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment