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 {
7272 /// MARK: Common configuration
7373
7474 /// Is all formatting disbled?
75- public var allDisabled : Bool
75+ public var allDisabled = false
7676
7777 /// The dictionary containing the rule names that we wish to run on. A rule is not used if it is
7878 /// marked as `false`, or if it is missing from the dictionary.
@@ -285,7 +285,9 @@ public struct Configuration: Codable, Equatable {
285285 /// Creates a new `Configuration` by loading it from a configuration file.
286286 public init ( contentsOf url: URL ) throws {
287287 if url. lastPathComponent == Self . suppressionFileName {
288- self = Configuration ( allDisabled: true )
288+ var config = Configuration ( )
289+ config. allDisabled = true
290+ self = config
289291 return
290292 }
291293
@@ -323,7 +325,7 @@ public struct Configuration: Codable, Equatable {
323325 let defaults = Configuration ( )
324326
325327 self . allDisabled =
326- try container. decideIfPresent ( Bool . self, forKey: . allDisabled)
328+ try container. decodeIfPresent ( Bool . self, forKey: . allDisabled)
327329 ?? false
328330 self . maximumBlankLines =
329331 try container. decodeIfPresent ( Int . self, forKey: . maximumBlankLines)
You can’t perform that action at this time.
0 commit comments