ci: Fallback to the full clang-tidy scan if files can not be found

This commit is contained in:
Eduardo Almeida
2022-12-08 20:13:52 +00:00
parent 61b47fc5ed
commit a093341e12

View File

@@ -79,6 +79,12 @@ clang-tidy-diff:
clang-tidy-diff-14.py -path cmake-cache/ -p1 -quiet
1> $CLANG_TIDY_OUTPUT
2> /dev/null
- if egrep -A 3 "file not found \[clang-diagnostic-error\]" $CLANG_TIDY_OUTPUT ; then
echo "Clang-tidy could not find the above files. Running a full clang-tidy check." ;
run-clang-tidy-14 -p cmake-cache/ -quiet
1> $CLANG_TIDY_OUTPUT
2> /dev/null ;
fi
- (! egrep -A 3 "error:|warning:|note:" $CLANG_TIDY_OUTPUT)
- echo "No clang-tidy errors found"