From a093341e12e1e1968a000557ed6124a3ec547f03 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Thu, 8 Dec 2022 20:13:52 +0000 Subject: [PATCH] ci: Fallback to the full clang-tidy scan if files can not be found --- utils/tests/gitlab-ci-code-linting.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/tests/gitlab-ci-code-linting.yml b/utils/tests/gitlab-ci-code-linting.yml index 1bd41424a..956847aa7 100644 --- a/utils/tests/gitlab-ci-code-linting.yml +++ b/utils/tests/gitlab-ci-code-linting.yml @@ -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"