Avoid parsing of fatalerror.cpp as lint failure
authorPaul Bauer <paul.bauer.q@gmail.com>
Sun, 24 May 2020 08:03:01 +0000 (08:03 +0000)
committerMark Abraham <mark.j.abraham@gmail.com>
Sun, 24 May 2020 08:03:01 +0000 (08:03 +0000)
When the file was changed its presence could cause the linter to fail
even though no errors are present. Fixed by avoiding the name in the
regular expression.

Change-Id: I0c066ede89b30bfd98b5ad335ec40ea756445e00

admin/clang-tidy.sh

index f5a3f22c260e046ecd79b2bd206f43cb7f883dab..a430403e21dad8b644542b107e68e86273de2202 100755 (executable)
@@ -174,7 +174,7 @@ cd $tmpdir/new
 if [[ $tidy_mode != "off" &&  -s $tmpdir/filelist_clangtidy ]] ; then
     $RUN_CLANG_TIDY `cat $tmpdir/filelist_clangtidy` -header-filter=.* -j $concurrency -fix -quiet -extra-arg=--cuda-host-only -extra-arg=-nocudainc>$tmpdir/clang-tidy.out 2>&1
     awk '/warning/,/clang-tidy|^$/' $tmpdir/clang-tidy.out | grep -v "warnings generated." | grep -v "Suppressed .* warnings" | grep -v "clang-analyzer"  | grep -v "to display errors from all non" | sed '/^\s*$/d' > $tmpdir/clang-tidy-warnings.out
-    awk '/.*error.*/' $tmpdir/clang-tidy.out > $tmpdir/clang-tidy-errors.out || true
+    awk '/.*\berror\b.(' $tmpdir/clang-tidy.out > $tmpdir/clang-tidy-errors.out || true
     if [ -s $tmpdir/clang-tidy-errors.out ]; then
         echo "Running of clang-tidy failed. Check output below for errors:"
         cat $tmpdir/clang-tidy-errors.out