From a36d2f5420dee5b0ac1d0c55e83e1ea6dea3b879 Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Thu, 19 Feb 2026 18:57:43 -0500 Subject: [PATCH] macos: swiftlint 'unused_closure_parameter' rule --- macos/.swiftlint.yml | 1 - .../Window Styles/TransparentTitlebarTerminalWindow.swift | 4 ++-- macos/Sources/Ghostty/Surface View/SurfaceView.swift | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/macos/.swiftlint.yml b/macos/.swiftlint.yml index 43bd460f9..d4103690c 100644 --- a/macos/.swiftlint.yml +++ b/macos/.swiftlint.yml @@ -24,7 +24,6 @@ disabled_rules: - orphaned_doc_comment - shorthand_operator - switch_case_alignment - - unused_closure_parameter - unused_enumerated - unused_optional_binding - vertical_parameter_alignment diff --git a/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift b/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift index a72436d7f..a547d5286 100644 --- a/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift +++ b/macos/Sources/Features/Terminal/Window Styles/TransparentTitlebarTerminalWindow.swift @@ -151,7 +151,7 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { tabGroupWindowsObservation = tabGroup.observe( \.windows, options: [.new] - ) { [weak self] _, change in + ) { [weak self] _, _ in // NOTE: At one point, I guarded this on only if we went from 0 to N // or N to 0 under the assumption that the tab bar would only get // replaced on those cases. This turned out to be false (Tahoe). @@ -175,7 +175,7 @@ class TransparentTitlebarTerminalWindow: TerminalWindow { tabBarVisibleObservation = tabGroup?.observe( \.isTabBarVisible, options: [.new] - ) { [weak self] _, change in + ) { [weak self] _, _ in guard let self else { return } guard let lastSurfaceConfig else { return } self.syncAppearance(lastSurfaceConfig) diff --git a/macos/Sources/Ghostty/Surface View/SurfaceView.swift b/macos/Sources/Ghostty/Surface View/SurfaceView.swift index 60d5caeaf..50575e482 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceView.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceView.swift @@ -865,7 +865,7 @@ extension Ghostty { // Key sequence indicator if !keySequence.isEmpty { HStack(alignment: .center, spacing: 4) { - ForEach(Array(keySequence.enumerated()), id: \.offset) { index, key in + ForEach(Array(keySequence.enumerated()), id: \.offset) { _, key in KeyCap(key.description) }