From 3d3ea3fa596a27075a1cef601217a0780edca20c Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Fri, 20 Feb 2026 13:01:30 -0500 Subject: [PATCH] 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 --- macos/.swiftlint.yml | 2 +- macos/Sources/App/macOS/AppDelegate.swift | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/macos/.swiftlint.yml b/macos/.swiftlint.yml index 4cbaf0fac..7a27b45da 100644 --- a/macos/.swiftlint.yml +++ b/macos/.swiftlint.yml @@ -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: diff --git a/macos/Sources/App/macOS/AppDelegate.swift b/macos/Sources/App/macOS/AppDelegate.swift index 1aa597a25..1b740e369 100644 --- a/macos/Sources/App/macOS/AppDelegate.swift +++ b/macos/Sources/App/macOS/AppDelegate.swift @@ -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: