diff --git a/.github/workflows/clang-tidy-lint.yml b/.github/workflows/clang-tidy-lint.yml index edbf2093aa..50474a3637 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 || true - 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