From a540cf83ae088fa4fe5e11481b1cc883950c6a38 Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Thu, 28 May 2026 13:50:34 +0100 Subject: [PATCH] fix dev swift fix command --- platforms/swift/.swiftformat | 1 - platforms/swift/Scripts/lint | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/platforms/swift/.swiftformat b/platforms/swift/.swiftformat index f601bcc1..1a7df57a 100644 --- a/platforms/swift/.swiftformat +++ b/platforms/swift/.swiftformat @@ -10,6 +10,5 @@ --swiftversion 5.7.1 --extensionacl on-declarations --exclude Sources/ShopifyCheckoutKit/Models.swift ---exclude Sources/ShopifyCheckoutProtocol/Generated --exclude Samples/MobileBuyIntegration/MobileBuyIntegration/Sources/Generated --exclude Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated diff --git a/platforms/swift/Scripts/lint b/platforms/swift/Scripts/lint index 22b82d4b..16902d67 100755 --- a/platforms/swift/Scripts/lint +++ b/platforms/swift/Scripts/lint @@ -99,15 +99,15 @@ if [[ "$VERBOSE" == "false" ]]; then QUIET_FLAG="--quiet" fi -if [[ "$MODE" == "fix" ]]; then - $SWIFTLINT lint --fix --no-cache $QUIET_FLAG -fi - # SwiftLint doesn't report errors when running in fix mode # Running again in strict mode to ensure no errors are missed. # Run from the directory containing .swiftlint.yml so its `included:` paths # resolve consistently. PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)" +if [[ "$MODE" == "fix" ]]; then + (cd "$PROJECT_ROOT" && $SWIFTLINT lint --fix --no-cache $QUIET_FLAG) +fi + (cd "$PROJECT_ROOT" && $SWIFTLINT lint --strict --no-cache $QUIET_FLAG) LINT_STATUS=$?