[unused_declaration] Unused class/struct is not detected if it conforms to a protocol in extension #5550
Closed
2 tasks done
Labels
bug
Unexpected and reproducible misbehavior.
New Issue Checklist
Describe the bug
When a
class
/struct
is not used anywhere but has conformance to a protocol in extension, it's not detected as unused byunused_declaration
analyzer rule, while when conformance to a protocol is in declaration, it is detected as unused.Complete output when running SwiftLint, including the stack trace and command used
Environment
swiftlint version
to be sure)?0.54.0
Homebrew, mint
If so, paste their relative paths and respective contents.
No
xcodebuild -version
)?Xcode 15.2
Build version 15C500b
https://github.com/vakhidbetrakhmadov/swift-compilation-database
This sample project demonstrates how a
class
/struct
that is not used anywhere but has conformance to a protocol in extension is not detected as unused byunused_declaration
analyzer rule (FooImpl
), while aclass
/struct
that is not used anywhere but conforms to a protocol in its declaration is (GooImpl
).The text was updated successfully, but these errors were encountered: