[Seaside] ignore Code Critics rules per class. (Was Re: Slime in one click image)

Lukas Renggli renggli at gmail.com
Fri Aug 7 10:48:23 UTC 2009


> Hi, When I subclass WASession, I get 'Class not referenced' from code
> critics; there's one instance of the problem for each method in the class.
> I've tried to set a pragma to ignore the rule as per:
> http://www.lukas-renggli.ch/blog/ignoring-lint-rules , but can't get it to
> ignore:
>
> currentNeatSheet
>
>        <ignoreLintRule: 'Class not referenced' rationale: 'session class
> configured by Seaside, accessed by self session' author: 'Stan Shepherd'>
>
>        ^ currentNeatSheet
>
> or
>
> currentNeatSheet
>
>        <ignoreLintRule: 'RBClassNotReferencedRule' rationale: 'session class
> configured by Seaside, accessed by self session' author: 'Stan Shepherd'>
>
>        ^ currentNeatSheet
>
> or
>
> currentNeatSheet
>
>        <lint: 'RBClassNotReferencedRule' rationale: 'session class configured by
> Seaside, accessed by self session' author: 'Stan Shepherd'>
>
>        ^ currentNeatSheet

All your examples should actually work. The reasons they don't is
because the filters only work on SelectorEnviornments. The
SelectorEnvironment is the object that is used internally to collect
the matches if the result are individual methods. In the case of the
RBClassNotReferencedRule a class environment is used, as the result
are individual classes.

I tried to fix the problem in Refactoring-Core-lr.53. It might not be
perfect yet, but it should solve your problem.

Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list