-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Rule Request: unowned_captures #2097
Labels
rule-request
Requests for a new rules.
Comments
Swift 4.1 provides that information in SourceKit structure:
However, this will probably not be enough because the attribute range for I've filled https://bugs.swift.org/browse/SR-7219 to track this. |
marcelofabri
added a commit
that referenced
this issue
Apr 30, 2019
marcelofabri
added a commit
that referenced
this issue
Apr 30, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New Issue Checklist
Rule Request
the community thinks about this.
Dunno if there's general consensus on this, but I have a strong preference to use
[weak foo]
captures over[unowned foo]
captures. Whileweak
can have performance implications and can require some additional code, it's safer thanunowned
. I've encountered quite a few mysterious crashes that were caused byunowned
captures, even in cases where it seemed like the lifetimes were the same.Triggering:
Non-triggering:
Nope.
See README.md for guidelines on when to mark a
rule as opt-in.
I'm not sure if there's enough consensus about this to enable it by default.
The text was updated successfully, but these errors were encountered: