File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,12 @@ public final class SwiftFormatter {
111
111
// also does not touch an empty file even if the setting to add trailing newlines is enabled.)
112
112
guard !source. isEmpty else { return }
113
113
114
+ // If allDisabled is set, just emit the source as-is.
115
+ guard !configuration. allDisabled else {
116
+ outputStream. write ( source)
117
+ return
118
+ }
119
+
114
120
let sourceFile = try parseAndEmitDiagnostics (
115
121
source: source,
116
122
operatorTable: . standardOperators,
Original file line number Diff line number Diff line change @@ -182,11 +182,6 @@ class Frontend {
182
182
return nil
183
183
}
184
184
185
- guard !configuration. allDisabled else {
186
- // Formatting is suppressed for this file.
187
- return nil
188
- }
189
-
190
185
return FileToProcess (
191
186
fileHandle: sourceFile,
192
187
url: url,
You can’t perform that action at this time.
0 commit comments