From 6c5a6a3bb3664af211284b5ab2ec18ece6de7f7d Mon Sep 17 00:00:00 2001 From: kannibalox Date: Thu, 26 Dec 2024 17:44:01 -0500 Subject: [PATCH] Manually include config.h for clang-tidy Specifically this fixes errors related to undefined macros in headers, since those aren't recorded in compile_commands.json --- .github/workflows/PR.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 67382f29..118ff4d6 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -54,7 +54,7 @@ jobs: mkdir clang-tidy-result - name: Analyze run: | - git diff -U0 "$(git merge-base HEAD "upstream/${{ github.event.pull_request.base.ref }}")" | clang-tidy-diff -p1 -path build -export-fixes clang-tidy-result/fixes.yml + git diff -U0 "$(git merge-base HEAD "upstream/${{ github.event.pull_request.base.ref }}")" | clang-tidy-diff -p1 -path build -export-fixes clang-tidy-result/fixes.yml "-extra-arg=-include/${PWD}/config.h" - name: Save PR metadata run: | echo "${{ github.event.number }}" > clang-tidy-result/pr-id.txt