Skip to content

Commit 1b81a28

Browse files
committed
Add short option and docs
1 parent 70b8a98 commit 1b81a28

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ as well as the following command line options:
8282
* `-i/--in-place`: Overwrites the input files when formatting instead of
8383
printing the results to standard output.
8484

85+
* `-p/--parallel`: Whether or not to run formatting or linting in parallel
86+
consuming all possible resources printing the results to standard output.
87+
8588
* `-r/--recursive`: If specified, then the tool will process `.swift` source
8689
files in any directories listed on the command line and their descendants.
8790
Without this flag, it is an error to list a directory on the command line.

Sources/swift-format/Subcommands/LintFormatOptions.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ struct LintFormatOptions: ParsableArguments {
5050
var ignoreUnparsableFiles: Bool = false
5151

5252
/// Whether or not to run the formatter/linter in parallel.
53-
@Flag(help: "Process files in parallel, simultaneously across multiple cores.")
53+
@Flag(
54+
name: .shortAndLong,
55+
help: "Process files in parallel, simultaneously across multiple cores.")
5456
var parallel: Bool = false
5557

5658
/// The list of paths to Swift source files that should be formatted or linted.

0 commit comments

Comments
 (0)