Skip to content

Commit aac6fe8

Browse files
committed
Don't lint if allDisabled is set.
1 parent 8bade83 commit aac6fe8

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
@@ -99,6 +99,11 @@ public final class SwiftLinter {
9999
// also does not touch an empty file even if the setting to add trailing newlines is enabled.)
100100
guard !source.isEmpty else { return }
101101

102+
// If allDisabled is set, do nothing.
103+
guard !configuration.allDisabled else {
104+
return
105+
}
106+
102107
let sourceFile = try parseAndEmitDiagnostics(
103108
source: source,
104109
operatorTable: .standardOperators,

0 commit comments

Comments
 (0)