[gjs: 3/4] CI: Exclude last line of cpplint report from diffs



commit 9e7284e2466dbc4003a1041235aa154bb4f53ede
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Mar 18 19:01:54 2018 -0700

    CI: Exclude last line of cpplint report from diffs
    
    The last line is a count of errors. We don't want to fail if the count is
    different, since it could be lower.

 test/test-ci.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/test/test-ci.sh b/test/test-ci.sh
index b8efbe8..1b93525 100755
--- a/test/test-ci.sh
+++ b/test/test-ci.sh
@@ -182,14 +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:/' > /cwd/current-report.txt
+        tee "$save_dir"/cpplint/current-report.txt | sed -E 's/:[0-9]+:/:LINE:/' | head -n -1 > 
/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:/' > /cwd/master-report.txt
+        tee "$save_dir"/cpplint/master-report.txt | sed -E 's/:[0-9]+:/:LINE:/' | head -n -1 > 
/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]