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 {
7171 /// MARK: Common configuration
7272
7373 /// Is all formatting disbled?
74- public var allDisabled : Bool
74+ public var allDisabled = false
7575
7676 /// The dictionary containing the rule names that we wish to run on. A rule is not used if it is
7777 /// marked as `false`, or if it is missing from the dictionary.
@@ -277,7 +277,9 @@ public struct Configuration: Codable, Equatable {
277277 /// Creates a new `Configuration` by loading it from a configuration file.
278278 public init ( contentsOf url: URL ) throws {
279279 if url. lastPathComponent == Self . suppressionFileName {
280- self = Configuration ( allDisabled: true )
280+ var config = Configuration ( )
281+ config. allDisabled = true
282+ self = config
281283 return
282284 }
283285
@@ -315,7 +317,7 @@ public struct Configuration: Codable, Equatable {
315317 let defaults = Configuration ( )
316318
317319 self . allDisabled =
318- try container. decideIfPresent ( Bool . self, forKey: . allDisabled)
320+ try container. decodeIfPresent ( Bool . self, forKey: . allDisabled)
319321 ?? false
320322 self . maximumBlankLines =
321323 try container. decodeIfPresent ( Int . self, forKey: . maximumBlankLines)
You can’t perform that action at this time.
0 commit comments