Uko / QualityAssistant

A live feedback code quality tool for Pharo
MIT License
17 stars 1 forks source link

Abstract method not overriden rule #22

Open peteruhnak opened 8 years ago

peteruhnak commented 8 years ago

(I am not sure if suggestions for new rules should go here or to fogzbugz; I can move it if needed…)

A new rule that would warn me if I didn't override an abstract method.

An abstract method contains self subclassResponsibility.

The "autofix" option could use RBRealizeClassRefactoring to automatically create stubs for the abstract methods. (This is what is used by right click on class → Refactoring → class refactoring → realize)

Uko commented 8 years ago

Hi. There is already RBSubclassResponsibilityNotDefinedRule. But I think that the validation should be shifted to the class that is missing concrete implementations. There is already an autofix, but using refactoring may be more sense. I'll give it a try, thanks :)

peteruhnak commented 8 years ago

Having it in the subclass sounds more sensible. It's not the parent's fault that the children don't obey. :)