Hmm⦠didnât know about that. But now Iâm not sure that every rule refines that. Uko
On 13 Oct 2014, at 18:13, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
I tell them apart by looking at their #resultClass. HTH, Jan
On Mon, 2014-10-13 at 17:30 +0200, Yuriy Tymchuk wrote:
Hi,
In Smalllint the basic rule has two methods: #checkClass: and #checkMethod:.
They do nothing, and the idea is that every rule is used to check both classes and methods, but only ones that redefine #checkClass: or #checkMethod: actually do something. This is fine, but I wonder if it is possible, to tell about the rule whether it checks method or not. Just checking is it local defines #checkMethod: doesnât work, as some rules define #checkMethod: and then their subclasses override other methods. One idea that I had is to get the CompiledMethod object of RBBasicLintRule and check if it is different from the one used in current class. But maybe there is a better way?
Uko