diff --git a/Source/SwiftLintFramework/Models/Configuration.swift b/Source/SwiftLintFramework/Models/Configuration.swift index 15c6cb247bc..0896546f771 100644 --- a/Source/SwiftLintFramework/Models/Configuration.swift +++ b/Source/SwiftLintFramework/Models/Configuration.swift @@ -126,9 +126,10 @@ public struct Configuration: Equatable { let identifier = rule.description.identifier if let ConfigurableRuleType = rule as? ConfigurableRule.Type, ruleConfig = dict?[identifier] { - if let configuredRule = try? ConfigurableRuleType.init(config: ruleConfig) { + do { + let configuredRule = try ConfigurableRuleType.init(config: ruleConfig) rules.append(configuredRule) - } else { + } catch { queuedPrintError("Invalid config for '\(identifier)'. Falling back to default.") rules.append(rule.init()) }