From eb18655d27e1dc838e4e19b7ae44ba222a36681a Mon Sep 17 00:00:00 2001 From: Ricardo Antunes Date: Thu, 9 Nov 2023 11:04:41 +0000 Subject: [PATCH] fix(ci): add NOLINT for misc-include-cleaner --- .github/workflows/clang-tidy-lint.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clang-tidy-lint.yml b/.github/workflows/clang-tidy-lint.yml index cea58f80f..5f255d802 100644 --- a/.github/workflows/clang-tidy-lint.yml +++ b/.github/workflows/clang-tidy-lint.yml @@ -27,12 +27,17 @@ jobs: - name: Make all changed headers reachable run: | - git diff -U0 --name-only HEAD^ | grep -oP 'core/include/\K.*.hpp' | awk '{ $0= "#include <" $0 ">"; print }' > core/src/extra.cpp + echo '// NOLINTBEGIN(misc-include-cleaner)' > core/src/extra.cpp + git diff -U0 --name-only HEAD^ | grep -oP 'core/include/\K.*.hpp' | awk '{ $0= "#include <" $0 ">"; print }' >> core/src/extra.cpp git diff -U0 --name-only HEAD^ | grep -oP 'core/src/\K.*.hpp' | awk '{ $0= "#include \"" $0 "\""; print }' >> core/src/extra.cpp + echo '// NOLINTEND(misc-include-cleaner)' >> core/src/extra.cpp sed -i '/set(CUBOS_CORE_SOURCE/a "src/extra.cpp"' core/CMakeLists.txt git add core/src/extra.cpp - git diff -U0 --name-only HEAD^ | grep -oP 'engine/include/\K.*.hpp' | awk '{ $0= "#include <" $0 ">"; print }' > engine/src/extra.cpp + + echo '// NOLINTBEGIN(misc-include-cleaner)' > engine/src/extra.cpp + git diff -U0 --name-only HEAD^ | grep -oP 'engine/include/\K.*.hpp' | awk '{ $0= "#include <" $0 ">"; print }' >> engine/src/extra.cpp git diff -U0 --name-only HEAD^ | grep -oP 'engine/src/\K.*.hpp' | awk '{ $0= "#include \"" $0 "\""; print }' >> engine/src/extra.cpp + echo '// NOLINTEND(misc-include-cleaner)' >> engine/src/extra.cpp sed -i '/set(CUBOS_ENGINE_SOURCE/a "src/extra.cpp"' engine/CMakeLists.txt git add engine/src/extra.cpp