Re: [Codenarc-developer] UnusedMethodParameterRule - ignore main() method
Brought to you by:
chrismair
From: Hamlet D. <ham...@ca...> - 2011-10-31 05:46:24
|
I think in this case I would just hard code the rule not to error on "public static void main(String[] args)" methods. If you do add a property, then you might as well make it a regex. That has been my thinking... just make it a regex unless there is a good reason not to. ----- Original Message ----- > > > > > Hamlet, > > > > Running CodeNarc snapshot against my projects at work, I am getting > violations for UnusedMethodParameterRule on main () methods. I think > it should ignore those methods by default. > > > > My first instinct would be to introduce a ignoreMethodNames property > (defaulted to ‘main’) on that rule, consistent with the Naming, Size > and other existing rules. But you seem to prefer regex. Do you have > an opinion in this case? Or I guess we could hard-code it to just > ignore main (). > > > > Chris > ------------------------------------------------------------------------------ > Get your Android app more play: Bring it to the BlackBerry PlayBook > in minutes. BlackBerry App World™ now supports Android™ > Apps > for the BlackBerry® PlayBook™. Discover just how easy and > simple > it is! http://p.sf.net/sfu/android-dev2dev > > _______________________________________________ > Codenarc-developer mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-developer > |