- Home
- Code Formatting Tools
- swift-format
On the recordRead 11 Oct 202613 facts
swift-format
Plans and prices
swift-format
Free
Apache-2.0 licensed · available via Swift toolchain, Homebrew, or source
Read 11 Oct 2026 · github.com
On the record
- Configuration
- Users can customize supported behavior with a JSON configuration file, and the tool searches parent directories for a .swift-format file.github.com · read 11 Oct 2026
- Formatting
- Its format command formats one or more Swift source files or source code read from standard input.github.com · read 11 Oct 2026
- Install options
- The project documents installation through the Swift toolchain, Homebrew, or building from source.github.com · read 11 Oct 2026
- Integrations
- swift-format provides formatting technology for SourceKit-LSP.github.com · read 11 Oct 2026
- Language compatibility
- Earlier swift-format versions may not recognize syntax added in later language and parser versions.github.com · read 11 Oct 2026
- License
- The repository identifies its license as Apache-2.0.github.com · read 11 Oct 2026
- Linting
- Its lint command checks Swift files for style violations and prints diagnostics to standard error.github.com · read 11 Oct 2026
- Operating systems
- The README documents using the tool through the Swift toolchain and Homebrew and building it from source; it does not specify operating system support on that page.github.com · read 11 Oct 2026
- Purpose
- swift-format provides formatting technology for Swift source code and building blocks for code formatting transformations.github.com · read 11 Oct 2026
- Style caveat
- The project says no default Swift code style guidelines have yet been proposed and describes its current style as one possibility for experimentation.github.com · read 11 Oct 2026
- Swift API
- Swift applications can use the SwiftFormat package module, including SwiftFormatter and SwiftLinter APIs.github.com · read 11 Oct 2026
- SwiftPM plugins
- The package provides Swift Package Manager command plugins for formatting and linting source code.github.com · read 11 Oct 2026
- Toolchain inclusion
- The README says Swift 6, included with Xcode 16, and later include swift-format in the toolchain.github.com · read 11 Oct 2026