Event-based TipKit rule triggers an empty_count
violation
#5883
Labels
bug
Unexpected and reproducible misbehavior.
good first issue
Issue to be taken up by new contributors yet unfamiliar with the project.
New Issue Checklist
Bug Description
TipKit uses the
#Rule
macro to define the conditions that must be fulfilled for a tip to be displayed:$0.donations.count > 0
triggers theempty_count
rule violation. However, changing this to$0.donations.isEmpty
causes a build error, "Event Rules do not support keyPath operations.", so I have to resort to disabling theempty_count
rule here.#Rule
is a Swift macro that expects an event donation count to be compared with a number, failing to generate code otherwise, so there aren't any alternatives.Environment
swiftlint.yml
The text was updated successfully, but these errors were encountered: