#362 Add doNotApplyToMethod configuration option

open
nobody
None
5
2013-02-16
2011-10-28
Marcin Erdmann
No

I know that I can turn off a rule check for a method using @SuppressWarnings but I don't want to have to actually change my code to configure codenarc - I find it obtrusive. It would be great if there was an option to configure rule applying on methods (and fields as well?) using the properties file.

Discussion

  • Chris Mair
    Chris Mair
    2012-02-09

    Several of the method-level rules provide an ignoreMethodNames property to allow filtering out violations for named methods. If you need that on a method-level rule that does not already provide that, please open a feature request for those rule(s),

    The problem is that many of the other rules (non method-level) is that the rules are implemented to visit specific elements of the Groovy AST, and we do not have easy access to the "owning" method, if there is one, from there.