From f2c6c54566e5c8fcc721cca957a5e47c22732ec6 Mon Sep 17 00:00:00 2001 From: William Throwe Date: Mon, 27 Jan 2025 15:34:03 -0500 Subject: [PATCH 1/2] Disable clang-tidy misc-include-cleaner Attempted IWYU replacement. I think it shows promise, but it's not ready. In particular, there's no way to get it to not try to include private headers of system libraries. --- .clang-tidy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index 4ba24c9dbee2..9d0791987c7b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -59,6 +59,8 @@ Checks: '*, -misc-confusable-identifiers, # thinks constexpr variables in header files cause ODR violations, -misc-definitions-in-headers, +# Insufficiently configurable, does not handle system headers well, +-misc-include-cleaner, # false positives, -misc-noexcept-move-constructor, -misc-non-private-member-variables-in-classes, From e39f436f6dd9080f0010319287c02b5e762ff489 Mon Sep 17 00:00:00 2001 From: William Throwe Date: Mon, 27 Jan 2025 16:18:37 -0500 Subject: [PATCH 2/2] Add clang-tidy dependency on Libsharp Needs the installed headers. --- .github/workflows/Tests.yaml | 2 +- cmake/SetupClangTidy.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Tests.yaml b/.github/workflows/Tests.yaml index 1798df37550b..f8b921ffcb27 100644 --- a/.github/workflows/Tests.yaml +++ b/.github/workflows/Tests.yaml @@ -269,7 +269,7 @@ jobs: -D BUILD_PYTHON_BINDINGS=ON $GITHUB_WORKSPACE - make -j4 module_All + make -j4 module_All Libsharp-external - name: Check clang-tidy run: > UPSTREAM_HASH=$(git merge-base HEAD upstream/develop) diff --git a/cmake/SetupClangTidy.cmake b/cmake/SetupClangTidy.cmake index 55da398c39b2..a1a2b898d362 100644 --- a/cmake/SetupClangTidy.cmake +++ b/cmake/SetupClangTidy.cmake @@ -25,6 +25,7 @@ if (CLANG_TIDY_BIN) message(STATUS "clang-tidy: ${CLANG_TIDY_BIN}") set(MODULES_TO_DEPEND_ON module_All + Libsharp ) if (TARGET SpectrePch) list(APPEND MODULES_TO_DEPEND_ON SpectrePch)