From 1999b1f366242c55e529210c23995f48268de74c Mon Sep 17 00:00:00 2001 From: "Chris (SPG) McGee" Date: Mon, 25 Nov 2024 12:16:46 -0500 Subject: [PATCH 1/3] Provide actionable instructions on a format failure in pull requests --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index b1554a2c..ae055bb2 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -55,5 +55,5 @@ jobs: linux_os_versions: "[\"jammy\"]" linux_exclude_swift_versions: "[{\"swift_version\": \"nightly-main\"},{\"swift_version\": \"nightly-6.0\"},{\"swift_version\": \"5.8\"},{\"swift_version\": \"5.9\"},{\"swift_version\": \"5.10\"}]" linux_pre_build_command: ./scripts/prep-gh-action.sh - linux_build_command: swift run swiftformat --lint --dryrun . + linux_build_command: swift run swiftformat --lint --dryrun . || (echo "Please run 'swift run swiftformat .' to format the source code."; exit 1) enable_windows_checks: false From 434d24e220d0b9aa1b9dade3c9149c289e9b30e9 Mon Sep 17 00:00:00 2001 From: "Chris (SPG) McGee" Date: Mon, 25 Nov 2024 12:19:48 -0500 Subject: [PATCH 2/3] Introduce formatting issues to check error message --- Sources/Swiftly/Swiftly.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Swiftly/Swiftly.swift b/Sources/Swiftly/Swiftly.swift index 1652c9a2..b27680d9 100644 --- a/Sources/Swiftly/Swiftly.swift +++ b/Sources/Swiftly/Swiftly.swift @@ -5,7 +5,7 @@ import LinuxPlatform #elseif os(macOS) import MacOSPlatform #endif -import SwiftlyCore +import SwiftlyCore public struct GlobalOptions: ParsableArguments { @Flag(name: [.customShort("y"), .long], help: "Disable confirmation prompts by assuming 'yes'") From ede554eba7d7ddb7302cd1b5fa3815e4a3b4d215 Mon Sep 17 00:00:00 2001 From: "Chris (SPG) McGee" Date: Mon, 25 Nov 2024 12:23:04 -0500 Subject: [PATCH 3/3] Fix the formatting error --- Sources/Swiftly/Swiftly.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Swiftly/Swiftly.swift b/Sources/Swiftly/Swiftly.swift index b27680d9..1652c9a2 100644 --- a/Sources/Swiftly/Swiftly.swift +++ b/Sources/Swiftly/Swiftly.swift @@ -5,7 +5,7 @@ import LinuxPlatform #elseif os(macOS) import MacOSPlatform #endif -import SwiftlyCore +import SwiftlyCore public struct GlobalOptions: ParsableArguments { @Flag(name: [.customShort("y"), .long], help: "Disable confirmation prompts by assuming 'yes'")