We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e64b26 commit 5afe05eCopy full SHA for 5afe05e
Sources/swift-format/Frontend/Frontend.swift
@@ -97,7 +97,12 @@ class Frontend {
97
98
/// Runs the linter or formatter over the inputs.
99
final func run() {
100
- if lintFormatOptions.paths.isEmpty {
+ if lintFormatOptions.paths == ["-"] {
101
+ processStandardInput()
102
+ } else if lintFormatOptions.paths.isEmpty {
103
+ diagnosticsEngine.emitWarning(
104
+ "running swift-format with no input paths is deprecated and will be removed in the future; specify '-' to use stdin"
105
+ )
106
processStandardInput()
107
} else {
108
processURLs(
0 commit comments