[gjs: 2/4] CI: Print out original linter reports
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 2/4] CI: Print out original linter reports
- Date: Wed, 21 Mar 2018 06:14:20 +0000 (UTC)
commit bd74b72fcdfee29fbff4469c9db096b4c7e011f2
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Mar 18 18:56:46 2018 -0700
CI: Print out original linter reports
As long as we are printing out the linter report in the CI output, we
should print it with the line numbers intact.
We also don't need to print out the master report.
test/test-ci.sh | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
---
diff --git a/test/test-ci.sh b/test/test-ci.sh
index 87a020b..b8efbe8 100755
--- a/test/test-ci.sh
+++ b/test/test-ci.sh
@@ -162,15 +162,14 @@ elif [[ $1 == "CPPCHECK" && "$log_message" != *'[skip cppcheck]'* ]]; then
echo
echo '-- Static code analyzer report --'
cppcheck --inline-suppr --enable=warning,performance,portability,information,missingInclude --force -q .
2>&1 | \
- tee "$save_dir"/cppcheck/current-report.txt | sed -E 's/:[0-9]+]/:LINE]/' | tee
/cwd/current-report.txt
+ tee "$save_dir"/cppcheck/current-report.txt | sed -E 's/:[0-9]+]/:LINE]/' > /cwd/current-report.txt
+ cat "$save_dir"/cppcheck/current-report.txt
echo
# Get the code committed at upstream master
do_Get_Upstream_Master
-
- echo '-- Master static code analyzer report --'
cppcheck --inline-suppr --enable=warning,performance,portability,information,missingInclude --force -q .
2>&1 | \
- tee "$save_dir"/cppcheck/master-report.txt | sed -E 's/:[0-9]+]/:LINE]/' | tee /cwd/master-report.txt
+ tee "$save_dir"/cppcheck/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
@@ -183,15 +182,14 @@ 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:/' | tee
/cwd/current-report.txt
+ 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
-
- echo '-- Master Lint report --'
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:/' | tee /cwd/master-report.txt
+ 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
@@ -206,19 +204,18 @@ elif [[ $1 == "ESLINT" && "$log_message" != *'[skip eslint]'* ]]; then
echo '-- Javascript linter report --'
eslint examples installed-tests modules --format unix 2>&1 | \
tee "$save_dir"/eslint/current-report.txt | \
- sed -E -e 's/:[0-9]+:[0-9]+:/:LINE:COL:/' -e 's/[0-9]+ problems//' -e 's/\/root\/tmp-upstream//' -e
"s,$tmp_path,," | \
- tee /cwd/current-report.txt
+ sed -E -e 's/:[0-9]+:[0-9]+:/:LINE:COL:/' -e 's/[0-9]+ problems//' -e 's/\/root\/tmp-upstream//' -e
"s,$tmp_path,," \
+ > /cwd/current-report.txt
+ cat "$save_dir"/eslint/current-report.txt
echo
# Get the code committed at upstream master
do_Get_Upstream_Master
cp "$save_dir"/.eslint* .
-
- echo '-- Master Javascript linter report --'
eslint examples installed-tests modules --format unix 2>&1 | \
tee "$save_dir"/eslint/master-report.txt | \
- sed -E -e 's/:[0-9]+:[0-9]+:/:LINE:COL:/' -e 's/[0-9]+ problems//' -e 's/\/root\/tmp-upstream//' -e
"s,$tmp_path,," | \
- tee /cwd/master-report.txt
+ sed -E -e 's/:[0-9]+:[0-9]+:/:LINE:COL:/' -e 's/[0-9]+ problems//' -e 's/\/root\/tmp-upstream//' -e
"s,$tmp_path,," \
+ > /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]