questionable questionable code critic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

questionable questionable code critic

Peter Uhnak
Why does CodeCritic (QualityAssistant) considers this questionable

~~~~~~~~~~~~~~~~
canBeTargetFor: aController
^ aController isKindOf: DMNodeController
~~~~~~~~~~~~~~~~

and yet this seems fine to him

~~~~~~~~~~~~~~~~
canBeTargetFor: aController
^ aController class = DMNodeController
~~~~~~~~~~~~~~~~

shouldn't it be the same?

Peter
Reply | Threaded
Open this post in threaded view
|

Re: questionable questionable code critic

Clément Béra
Code critics relies on simple rules, such as the use of the selector #isKindOf: .

It does not detect the second case because the rule is simple, though both are questionable.

Best,

2015-04-24 18:24 GMT+02:00 Peter Uhnák <[hidden email]>:
Why does CodeCritic (QualityAssistant) considers this questionable

~~~~~~~~~~~~~~~~
canBeTargetFor: aController
^ aController isKindOf: DMNodeController
~~~~~~~~~~~~~~~~

and yet this seems fine to him

~~~~~~~~~~~~~~~~
canBeTargetFor: aController
^ aController class = DMNodeController
~~~~~~~~~~~~~~~~

shouldn't it be the same?

Peter