diff --git a/.github/workflows/pull_request_soundness.yml b/.github/workflows/pull_request_soundness.yml index 26bc7fbb7a..f0cccd88c2 100644 --- a/.github/workflows/pull_request_soundness.yml +++ b/.github/workflows/pull_request_soundness.yml @@ -126,9 +126,9 @@ jobs: - name: Mark the workspace as safe # https://github.com/actions/checkout/issues/766 run: git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Run format lint check - run: swift format lint --strict --recursive --parallel . - - name: Run format and check for modified files - run: | - swift format format --parallel --recursive --in-place . - git diff-index --quiet HEAD + - name: Format Swift files + run: git ls-files -z '*.swift' | xargs -0 swift format format --parallel --in-place + - name: Lint Swift files + run: git ls-files -z '*.swift' | xargs -0 swift format lint --strict --parallel + - name: Check format produced no diff + run: GIT_PAGER= git diff --exit-code '*.swift'