format
Run SwiftFormat.
Runs SwiftFormat against the project, using the .swiftformat config generated by new.
Synopsis
Section titled “Synopsis”swiftspawn format [--check]Description
Section titled “Description”A thin wrapper around swiftformat. Without flags, formats files in place. With --check, exits non-zero if formatting would change anything (useful in CI).
SwiftFormat must be installed separately (brew install swiftformat).
Examples
Section titled “Examples”swiftspawn formatswiftspawn format --checkOptions
Section titled “Options”| Flag | Description |
|---|---|
--check | Check-only mode; non-zero exit if formatting would change files. |
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 5 | Not in a swiftspawn project. |
| 6 | SwiftFormat not installed. |
--check mode also returns non-zero from SwiftFormat itself when formatting would change files.