From 96ada62c277f7b4cc4d6cdf925ebd13150b1a1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Fonseca?= Date: Wed, 27 Sep 2023 01:08:50 +0100 Subject: [PATCH] fix: let clang tidy reach headers --- .github/workflows/clang-tidy-lint.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/clang-tidy-lint.yml b/.github/workflows/clang-tidy-lint.yml index edbf2093aa..bcd31a113e 100644 --- a/.github/workflows/clang-tidy-lint.yml +++ b/.github/workflows/clang-tidy-lint.yml @@ -29,18 +29,17 @@ jobs: CC: gcc-11 CXX: g++-11 - - name: Create results directory - run: | - mkdir clang-tidy-result - - name: Analyze run: | - git diff -U0 HEAD^ | clang-tidy-diff -p1 -path build -export-fixes clang-tidy-result/fixes.yml + run-clang-tidy -j$(nproc) -p=build \ + -header-filter="(core|engine)/include/.*" \ + files "($(git diff -U0 --name-only HEAD^ | paste -s -d\|))" \ + -export-fixes clang-tidy-fixes.yaml - name: Run clang-tidy-pr-comments action uses: platisd/clang-tidy-pr-comments@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - clang_tidy_fixes: clang-tidy-result/fixes.yml + clang_tidy_fixes: clang-tidy-fixes.yaml request_changes: true suggestions_per_comment: 10