One of the struggles with our cli tool is that the pipeline needs to build swiftlang/swift-format. I was surprised to read in the readme that it not is included in the xcode 16 toolchain and can be used system wide. Just test by running swift format -h and that works!
However if I try the same in pipeline that runs swiftlang/swift:nightly-6.0-jammy this times out. Is this to be expected? The command swift format lint just never starts.
Sorry to be late on my own question. With the nightly of swift now which is available in docker swift includes format as a subcommand also on linux.
# Just do not use the -!
swift format -h
OVERVIEW: Format or lint Swift source code
USAGE: swift-format [--version] <subcommand>
OPTIONS:
-v, --version Print the version and exit
-h, --help Show help information.
SUBCOMMANDS:
dump-configuration Dump the default configuration in JSON format to standard output
format (default) Format Swift source code
lint Diagnose style issues in Swift source code
See 'swift-format help <subcommand>' for detailed help.
But the weird thing is that it is not listed as a sub command of the swift main command. This seams a bug?
swift -h
...
Subcommands:
swift build Build Swift packages
swift package Create and work on packages
swift run Run a program from a package
swift test Run package tests
swift repl Experiment with Swift code interactively
Use `swift --version` for Swift version information.
Use `swift --help` for descriptions of available options and flags.
Use `swift help <subcommand>` for more information about a subcommand.