Skip to content

Commit fc2e249

Browse files
committed
Don't lint if allDisabled is set.
1 parent 7275d90 commit fc2e249

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/SwiftFormat/API/SwiftLinter.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ public final class SwiftLinter {
9494
// also does not touch an empty file even if the setting to add trailing newlines is enabled.)
9595
guard !source.isEmpty else { return }
9696

97+
// If allDisabled is set, do nothing.
98+
guard !configuration.allDisabled else {
99+
return
100+
}
101+
97102
let sourceFile = try parseAndEmitDiagnostics(
98103
source: source,
99104
operatorTable: .standardOperators,

0 commit comments

Comments
 (0)