Skip to content

Commit

Permalink
Update clang-format PR check to not throw errors when files are remov…
Browse files Browse the repository at this point in the history
…ed (#318)
  • Loading branch information
raccog authored Nov 9, 2023
1 parent 110b50c commit 83b1d6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: clang-format
run: |
# Run clang-format
CHANGED_FILES=`git diff --name-only -r HEAD~ | grep -E '.(c|cpp|h|hpp)$' | xargs`
CHANGED_FILES=`git diff --name-only -r HEAD~ --diff-filter=d | grep -E '.(c|cpp|h|hpp)$' | xargs`
echo "Changed files: $CHANGED_FILES"
[ -z "$CHANGED_FILES" ] && exit 0
clang-format -i $CHANGED_FILES
Expand Down

0 comments on commit 83b1d6f

Please sign in to comment.