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 @@ -71,7 +71,7 @@ public struct Configuration: Codable, Equatable {
71
71
/// MARK: Common configuration
72
72
73
73
/// Is all formatting disbled?
74
- public var allDisabled : Bool
74
+ public var allDisabled = false
75
75
76
76
/// The dictionary containing the rule names that we wish to run on. A rule is not used if it is
77
77
/// marked as `false`, or if it is missing from the dictionary.
@@ -277,7 +277,9 @@ public struct Configuration: Codable, Equatable {
277
277
/// Creates a new `Configuration` by loading it from a configuration file.
278
278
public init ( contentsOf url: URL ) throws {
279
279
if url. lastPathComponent == Self . suppressionFileName {
280
- self = Configuration ( allDisabled: true )
280
+ var config = Configuration ( )
281
+ config. allDisabled = true
282
+ self = config
281
283
return
282
284
}
283
285
@@ -315,7 +317,7 @@ public struct Configuration: Codable, Equatable {
315
317
let defaults = Configuration ( )
316
318
317
319
self . allDisabled =
318
- try container. decideIfPresent ( Bool . self, forKey: . allDisabled)
320
+ try container. decodeIfPresent ( Bool . self, forKey: . allDisabled)
319
321
?? false
320
322
self . maximumBlankLines =
321
323
try container. decodeIfPresent ( Int . self, forKey: . maximumBlankLines)
You can’t perform that action at this time.
0 commit comments