File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public struct Configuration: Codable, Equatable {
72
72
/// MARK: Common configuration
73
73
74
74
/// Is all formatting disbled?
75
- public var allDisabled : Bool
75
+ public var allDisabled = false
76
76
77
77
/// The dictionary containing the rule names that we wish to run on. A rule is not used if it is
78
78
/// marked as `false`, or if it is missing from the dictionary.
@@ -285,7 +285,9 @@ public struct Configuration: Codable, Equatable {
285
285
/// Creates a new `Configuration` by loading it from a configuration file.
286
286
public init ( contentsOf url: URL ) throws {
287
287
if url. lastPathComponent == Self . suppressionFileName {
288
- self = Configuration ( allDisabled: true )
288
+ var config = Configuration ( )
289
+ config. allDisabled = true
290
+ self = config
289
291
return
290
292
}
291
293
@@ -323,7 +325,7 @@ public struct Configuration: Codable, Equatable {
323
325
let defaults = Configuration ( )
324
326
325
327
self . allDisabled =
326
- try container. decideIfPresent ( Bool . self, forKey: . allDisabled)
328
+ try container. decodeIfPresent ( Bool . self, forKey: . allDisabled)
327
329
?? false
328
330
self . maximumBlankLines =
329
331
try container. decodeIfPresent ( Int . self, forKey: . maximumBlankLines)
You can’t perform that action at this time.
0 commit comments