Просмотр исходного кода

Fix clang-tidy action handling of deletes (#5162)

Example error I'm trying to fix:

https://github.com/carbon-language/carbon-lang/actions/runs/13979696174/job/39142020031

file_system.cpp is deleted and not part of any targets. It should be
excluded from the query.
Jon Ross-Perkins 1 год назад
Родитель
Сommit
381a01f673
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      .github/actions/test-setup/action.yml

+ 2 - 2
.github/actions/test-setup/action.yml

@@ -154,8 +154,8 @@ runs:
         # spaces. Note we can filter to the intersection of Carbon extensions
         # and the supported list at:
         # https://github.com/erenon/bazel_clang_tidy/blob/master/clang_tidy/clang_tidy.bzl#L65
-        for f in $(
-            git diff --name-only $GIT_BASE_SHA -- '**/*.h' '**/*.cpp'); do
+        for f in $(git diff --name-only --diff-filter=d \
+                     $GIT_BASE_SHA -- '**/*.h' '**/*.cpp'); do
           echo "  union '$f'" >> $QUERY_FILE
         done