From 88bc0baa99041aac880c8faabf07df3f7dff84fb Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Mon, 24 Nov 2025 13:09:13 +0100 Subject: [PATCH] Invoke `swift-format` instead of `swift format` in `check-swift-format.sh` This allows us to override the `swift-format` executable to a locally built copy by adding the locally built version to PATH in https://github.com/swiftlang/swift-format/pull/1093. --- .github/workflows/scripts/check-swift-format.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/scripts/check-swift-format.sh b/.github/workflows/scripts/check-swift-format.sh index a3c3221..fb6d351 100755 --- a/.github/workflows/scripts/check-swift-format.sh +++ b/.github/workflows/scripts/check-swift-format.sh @@ -21,19 +21,19 @@ fatal() { error "$@"; exit 1; } if [[ -f .swiftformatignore ]]; then log "Found swiftformatignore file..." - log "Running swift format format..." - tr '\n' '\0' < .swiftformatignore| xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 swift format format --parallel --in-place + log "Running swift-format format..." + tr '\n' '\0' < .swiftformatignore| xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 swift-format format --parallel --in-place - log "Running swift format lint..." + log "Running swift-format lint..." - tr '\n' '\0' < .swiftformatignore | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 swift format lint --strict --parallel + tr '\n' '\0' < .swiftformatignore | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 swift-format lint --strict --parallel else - log "Running swift format format..." - git ls-files -z '*.swift' | xargs -0 swift format format --parallel --in-place + log "Running swift-format format..." + git ls-files -z '*.swift' | xargs -0 swift-format format --parallel --in-place - log "Running swift format lint..." + log "Running swift-format lint..." - git ls-files -z '*.swift' | xargs -0 swift format lint --strict --parallel + git ls-files -z '*.swift' | xargs -0 swift-format lint --strict --parallel fi