Lint Rule for Class-Side Method

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

Lint Rule for Class-Side Method

Sean P. DeNigris
Administrator
I'm probably missing something obvious, but it seems like #checksMethod Lint Rules only get checked against instance-side methods. How does one check class-side methods? I converted it to a #checksClass rule, but then hits showed the class definition instead of the offending method source.

Thanks.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Lint Rule for Class-Side Method

Sean P. DeNigris
Administrator
Sean P. DeNigris wrote
I'm probably missing something obvious, but it seems like #checksMethod Lint Rules only get checked against instance-side methods. How does one check class-side methods? I converted it to a #checksClass rule, but then hits showed the class definition instead of the offending method source.
Bump.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Lint Rule for Class-Side Method

Uko2
Hi, sorry for late reply.

What are you using to obtain critiques? QualityAssistnat? CriticBrowser?

Cheers.
Uko


> On 06 Sep 2016, at 19:06, Sean P. DeNigris <[hidden email]> wrote:
>
> Sean P. DeNigris wrote
>> I'm probably missing something obvious, but it seems like #checksMethod
>> Lint Rules only get checked against instance-side methods. How does one
>> check class-side methods? I converted it to a #checksClass rule, but then
>> hits showed the class definition instead of the offending method source.
>
> Bump.
>
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Lint-Rule-for-Class-Side-Method-tp4914121p4914409.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Lint Rule for Class-Side Method

Sean P. DeNigris
Administrator
Uko2 wrote
What are you using to obtain critiques?
CriticBrowser
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Lint Rule for Class-Side Method

Uko2

> On 07 Sep 2016, at 23:41, Sean P. DeNigris <[hidden email]> wrote:
>
> Uko2 wrote
>> What are you using to obtain critiques?
>
> CriticBrowser

Ok, can you also, please, clarify which version of Pharo are you using?

>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Lint-Rule-for-Class-Side-Method-tp4914121p4914674.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Lint Rule for Class-Side Method

Sean P. DeNigris
Administrator
Uko2 wrote
Ok, can you also, please, clarify which version of Pharo are you using?
Sure, sorry for the vague report. Pharo 5
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Lint Rule for Class-Side Method

Uko2
Hi,

so in Pharo 5 CriticBrowser does not care about #checksClass, #checksMethod and so on. I am changing this in Pharo 6, but I didn’t have enough time for Pharo 5. For CriticBrowser you need to override instance-side methods #checkClass: or #checkMethod:. In your case you want to override  #checkMethod: and if you detect a critique you need to do: `result addMethod: yourMethodObject`. CriticBrowser checks automatically instance- and class-methods of the packages you select.

Uko

> On 08 Sep 2016, at 00:19, Sean P. DeNigris <[hidden email]> wrote:
>
> Uko2 wrote
>> Ok, can you also, please, clarify which version of Pharo are you using?
>
> Sure, sorry for the vague report. Pharo 5
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Lint-Rule-for-Class-Side-Method-tp4914121p4914682.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>