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 {
106106 // also does not touch an empty file even if the setting to add trailing newlines is enabled.)
107107 guard !source. isEmpty else { return }
108108
109+ // If allDisabled is set, just emit the source as-is.
110+ guard !configuration. allDisabled else {
111+ outputStream. write ( source)
112+ return
113+ }
114+
109115 let sourceFile = try parseAndEmitDiagnostics (
110116 source: source,
111117 operatorTable: . standardOperators,
Original file line number Diff line number Diff line change @@ -182,11 +182,6 @@ class Frontend {
182182 return nil
183183 }
184184
185- guard !configuration. allDisabled else {
186- // Formatting is suppressed for this file.
187- return nil
188- }
189-
190185 return FileToProcess (
191186 fileHandle: sourceFile,
192187 url: url,
You can’t perform that action at this time.
0 commit comments