Skip to content

Commit ec7887e

Browse files
authored
Provide actionable instructions on a format failure in pull requests (#190)
When format failures occur they point out the files and line numbers, but not the command that will automatically fix the problems. As part of the GitHub workflow job this patch will echo the command that you can run with swiftly to auto-fix the formatting problems.
1 parent 0ce6cc5 commit ec7887e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ jobs:
5555
linux_os_versions: "[\"jammy\"]"
5656
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\"}]"
5757
linux_pre_build_command: ./scripts/prep-gh-action.sh
58-
linux_build_command: swift run swiftformat --lint --dryrun .
58+
linux_build_command: swift run swiftformat --lint --dryrun . || (echo "Please run 'swift run swiftformat .' to format the source code."; exit 1)
5959
enable_windows_checks: false

0 commit comments

Comments
 (0)