Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weak_delegate: @NSApplicationDelegateAdaptor should be excepted #3598

Closed
2 tasks done
tillhainbach opened this issue Apr 14, 2021 · 1 comment · Fixed by #3599
Closed
2 tasks done

weak_delegate: @NSApplicationDelegateAdaptor should be excepted #3598

tillhainbach opened this issue Apr 14, 2021 · 1 comment · Fixed by #3599

Comments

@tillhainbach
Copy link
Contributor

tillhainbach commented Apr 14, 2021

New Issue Checklist

New rule request

This is a complement to #3456:

The weak delegate rule fires on the following declaration, which is not appropriate:

@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

I will create a PR follow up PR, complementing the exception for these SwiftUI specified wrappers.

@circAssimilate
Copy link

I noticed that #3599 is approved but not merged. In case it wasn't clear to anyone the kinda difficult to arrive at workaround is this.

struct TimeTravelApp: App {
  // swiftlint:disable:next weak_delegate
  @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants