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 @@ -106,6 +106,12 @@ public final class SwiftFormatter {
106
106
// also does not touch an empty file even if the setting to add trailing newlines is enabled.)
107
107
guard !source. isEmpty else { return }
108
108
109
+ // If allDisabled is set, just emit the source as-is.
110
+ guard !configuration. allDisabled else {
111
+ outputStream. write ( source)
112
+ return
113
+ }
114
+
109
115
let sourceFile = try parseAndEmitDiagnostics (
110
116
source: source,
111
117
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