Installs Apple's own formatter for swift code, swift-format, built from source.
"features": {
"ghcr.io/LosFarmosCTL/swift-devcontainer-features/apple-swift-format:1": {}
}
Options Id | Description | Type | Default Value |
---|---|---|---|
version | The version of swift-format to install (depends on the installed Swift version, main should only be used for pre-release Swift snapshots). | string | latest |
Since there are no suitable binary releases available, swift-format
is always compiled from source. Therefore the devcontainer needs to include the following tools:
git
swift
(The version of Swift that is used in the container determines what version of swift-format should be installed. For details on which versions match refer to the swift-format README)curl
andsed
(Only iflatest
is used, needed to check GitHub releases)
A good container template that fulfills all requirements would be the swift-devcontainer-template
maintained by the official Swift Server workgroup.
Note: This file was auto-generated from the devcontainer-feature.json. Add additional notes to a NOTES.md
.