You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there! I love the new weak_delegate rule. It's super useful! We were however able to find a couple of cases where the weak_delegate rule is erroneously calling out a var:
The first is in a protocol:
protocol P {
var delegate: AnyObject? { get set }
}
weak is not allowed in that context, so this rule should probably skip delegate-like properties in protocols. The next is a variable that refers to a primitive:
class C {
var delegateCalled = false // Used in the context of a test mock object
}
In both cases, there is no action in the code that can be taken to fix the issue. This can be reproduced by just dropping those 2 declarations into a file called test.swift and running swiftlint lint --path test.swift with swiftlint version 0.13.2. Thanks!
The text was updated successfully, but these errors were encountered:
Hi there! I love the new
weak_delegate
rule. It's super useful! We were however able to find a couple of cases where theweak_delegate
rule is erroneously calling out avar
:The first is in a protocol:
weak
is not allowed in that context, so this rule should probably skip delegate-like properties in protocols. The next is a variable that refers to a primitive:In both cases, there is no action in the code that can be taken to fix the issue. This can be reproduced by just dropping those 2 declarations into a file called test.swift and running
swiftlint lint --path test.swift
withswiftlint
version 0.13.2. Thanks!The text was updated successfully, but these errors were encountered: