From 6b1c13a599f5a126697bb121ad555acbda320016 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Mon, 6 Mar 2023 18:43:20 +0000 Subject: [PATCH] ci: Fix clang-tidy-diff iregex --- utils/tests/gitlab-ci-code-linting.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/tests/gitlab-ci-code-linting.yml b/utils/tests/gitlab-ci-code-linting.yml index f64fa5226..5dcf07a89 100644 --- a/utils/tests/gitlab-ci-code-linting.yml +++ b/utils/tests/gitlab-ci-code-linting.yml @@ -77,9 +77,10 @@ clang-tidy-diff: script: - git remote add upstream https://gitlab.com/nsnam/ns-3-dev.git - git fetch upstream master + # File paths generated by git diff are relative to the working tree. Therefore, iregex should only contain paths relative to the working tree. - git diff -U0 upstream/master | clang-tidy-diff-14.py -path cmake-cache/ -p1 -quiet -use-color - -iregex ".*(ns|NS).*\/(contrib|examples|src|scratch|utils)\/.+\.(cpp|cc|cxx|c|h|hpp)" + -iregex "(contrib|examples|src|scratch|utils)\/.+\.(cpp|cc|cxx|c|h|hpp)" 1> $CLANG_TIDY_OUTPUT 2> /dev/null - if egrep -A 3 "file not found \[clang-diagnostic-error\]" $CLANG_TIDY_OUTPUT ; then