Skip to content

Commit 28a3d80

Browse files
[GHA] Only format Swift files that are in Git index
1 parent bf69999 commit 28a3d80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/pull_request_soundness.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ jobs:
127127
# https://github.com/actions/checkout/issues/766
128128
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
129129
- name: Run format lint check
130-
run: swift format lint --strict --recursive --parallel .
130+
run: git ls-files -z '*.swift' | xargs -0 swift format lint --strict --parallel
131131
- name: Run format and check for modified files
132132
run: |
133-
swift format format --parallel --recursive --in-place .
134-
git diff-index --quiet HEAD
133+
git ls-files -z '*.swift' | xargs -0 swift format format --parallel --in-place
134+
GIT_PAGER= git diff --exit-code

0 commit comments

Comments
 (0)