periphery icon indicating copy to clipboard operation
periphery copied to clipboard

False positive: static variable flagged in #Rule macro

Open lilidotshi opened this issue 1 year ago • 0 comments

I have the following code for tooltips in particular:

@available(iOS 17.0, *)
struct TestTip: Tip {
    // swiftlint:disable redundant_type_annotation
    @Parameter static var testBool: Bool = false

    var rules: [Rule] {
        #Rule(Self.$testBool) { $0 }
    }

Periphery is registering testBool as unused with

Property 'testBool' is assigned, but never used

It doesn't matter if I use TestTip.testBool or Self.testBool, so I'm wondering if the #Rule is not process correctly.

lilidotshi avatar Jun 05 '24 01:06 lilidotshi