Skip to content

OOP Inspections ​

Inspection (v2 / v0)Meaning
DeclaresAttributeis a given attribute declared?
DeclaresClassis a given class declared?
DeclaresInterfaceis a given interface declared?
DeclaresMethodis a given method declared?
DeclaresObjectis a given named object declared?
DeclaresPrimitiveIs the given primitive operator overriden?
DeclaresSuperclass / Inheritsis a given class declared as superclass?
Implementsis the given interface implemented?
IncludeMixinis a given mixin included?
Instantiatesis the given class instantiated?
UsesDynamicPolymorphismare there two or more method definitions for some sent selector?
UsesDynamicMethodOverloadis there a class that defined two methods with different arity but with the same name?
UsesInheritanceis any superclass explicitly declared?
UsesMixinsis any mixin explicitly included?
UsesObjectCompositionis there a class that declares an attribute and sends a message to it?
UsesStaticMethodOverload / UsesStaticPolymorphismis there a class that defined two method signatures but with the same name?
UsesTemplateMethodis there a class that sends a message whose corresponding method is not declared?

Code Smells ​

InspectionMeaning
DoesNilTestis there a test against a null value, like if x == nil then puts 'is nil'?
DoesTypeTestare there any tests against literal strings or types?
HasTooManyMethodsdoes a given class/object/interface have too many methods?
OverridesEqualOrHashButNotBothdoes a given class override equals but not hash? or hash but not equals?
ReturnsNildoes a method explicitly return null/nil?
UsesNamedSelfReferencedoes an object reference itself by its name instead of using self?