3 ms·
It's good that Periphery catches the unused code. But if that's the only reason it catches the problem, I think it could have room for improvement. For example
by Buge 8y ago
It's good that Periphery catches the unused code.
But if that's the only reason it catches the problem, I think it could have room for improvement. For example in one place the error could exist, but at a different place, the real function could be called because the variable is declared as a LazyGreeter. Then Periphery wouldn't catch the problem.
One way to fully catch it would be to give a warning if a base class implements a protocol but a derived class doesn't. I'm not sure how many false positives this would have. Possibly you might only do this if the derived class tries to override a function from the base class's protocol.