woshiccm / Pecker

CodePecker is a tool to detect unused Swift code.
MIT License
1.46k stars 63 forks source link

Warning for Methods in Protocol when satisfying conformance in extension #45

Closed RalfK92 closed 4 years ago

RalfK92 commented 4 years ago

protocol Protocol { var variable: Bool { get } func function(parameter: String?) -> String? }

Implementing this Protocol in a class and satisfying conformance in extension works for variable but not for function.

class Class: Protocol { }

extension Class { var variable: Bool { // no warning return "Temp" }

func function (parameter: String?) -> { // warning return parameter } }

woshiccm commented 4 years ago

Thanks, will fix it

victorrr commented 4 years ago

What is the status with this fix? If you have a lot of protocols you get spammed with false Pecker warnings

mthole commented 4 years ago

Used Pecker for the first time today and am loving it. I'm also running into this issue, though, so wanted to chime in and say 'me too'. Thanks for this tool!

woshiccm commented 4 years ago

this issue had been resolved in new version 0.4.0