macos: swiftlint 'no_fallthrough_only' rule

This rule is generally trying to be helpful, but it doesn't like a few
places in our code base where we're intentionally listing out all of the
well-known cases. Given that, just disable it.

https://realm.github.io/SwiftLint/no_fallthrough_only.html
This commit is contained in:
Jon Parise
2026-02-20 13:01:30 -05:00
parent 3ba6d8174d
commit 3d3ea3fa59
2 changed files with 2 additions and 8 deletions

View File

@@ -11,6 +11,7 @@ disabled_rules:
- function_body_length
- line_length
- nesting
- no_fallthrough_only
- todo
- trailing_comma
- trailing_newline
@@ -20,7 +21,6 @@ disabled_rules:
- for_where
- force_cast
- multiple_closures_with_trailing_closure
- no_fallthrough_only
- switch_case_alignment
identifier_name:

View File

@@ -380,13 +380,7 @@ class AppDelegate: NSObject,
if let why = event.attributeDescriptor(forKeyword: keyword) {
switch why.typeCodeValue {
case kAEShutDown:
fallthrough
case kAERestart:
fallthrough
case kAEReallyLogOut:
case kAEShutDown, kAERestart, kAEReallyLogOut:
return .terminateNow
default: