periphery
periphery copied to clipboard
Feature Request: detect unneeded `open`s and missing `final`s
I would like to be able to detect uses of open, where the class is not being subclassed outside its defining module, or the property or function is not being overridden outside its defining module.
I would also like to be able to detect where a class is not subclassed at all, or property or function is not overridden, and can therefore safely be declared final.
See https://github.com/realm/SwiftLint/issues/4838
Thanks for the suggestion. This should be possible, as it's similar to redundant public accessibility analysis.
That would be amazing. It would also be nice to know about these cases, which are legal, but slightly suspect:
public class Foo {
open var bar = 0
}