diff --git a/CHANGELOG.md b/CHANGELOG.md index 227628018..17d95e867 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ ##### Enhancements -* Add `fallthrough` opt-in rule that flags usage of `fallthrough`. +* Add `fallthrough` rule that flags usage of `fallthrough`. [Marcelo Fabri](https://github.com/marcelofabri) [#1834](https://github.com/realm/SwiftLint/issues/1834) diff --git a/Rules.md b/Rules.md index 45f4da491..37c2a2ac7 100644 --- a/Rules.md +++ b/Rules.md @@ -2496,7 +2496,7 @@ public extension Foo { Identifier | Enabled by default | Supports autocorrection | Kind --- | --- | --- | --- -`fallthrough` | Disabled | No | idiomatic +`fallthrough` | Enabled | No | idiomatic Fallthrough should be avoided. diff --git a/Source/SwiftLintFramework/Rules/FallthroughRule.swift b/Source/SwiftLintFramework/Rules/FallthroughRule.swift index 57a77ca16..3437d6577 100644 --- a/Source/SwiftLintFramework/Rules/FallthroughRule.swift +++ b/Source/SwiftLintFramework/Rules/FallthroughRule.swift @@ -8,7 +8,7 @@ import SourceKittenFramework -public struct FallthroughRule: ConfigurationProviderRule, OptInRule { +public struct FallthroughRule: ConfigurationProviderRule { public var configuration = SeverityConfiguration(.warning)