Re: ParameterNumber check after an @Override
"Wippermann, Peter, Vodafone DE" <[email protected]> Mon, 13 Aug 2012 12:08:46 +0000
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <BC82F33031993B47ACCBF902235BEC68AA82@VOEXM27W.internal.vodafone.com> |
Hi Ronan, Very good idea, I really encourage you to submit this as a feature request!= You could attach your sources to speed up things a little bit ;-) Regarding the maintenance of your custom check: It depends on your implemen= tation how much effort has to be put into maintenance. Did you implement your custom check as a delegation to the original check? = I mean something like this: http://en.wikipedia.org/wiki/Delegation_pattern= #Simple In that case all updates to the original check would become active in your = check without the need to build and deliver your custom class again. Best regards, Peter Wippermann = P.S. I find it quite interesting how many users, who publish on this list, = are actually from the TelCo (or associated) business! :-) = = -----Urspr=FCngliche Nachricht----- Von: Ronan DANIELLOU [mailto:[email protected]] = Gesendet: Freitag, 10. August 2012 17:58 An: [email protected] Betreff: [Checkstyle-user] ParameterNumber check after an @Override Hi everyone, I am using a rule for the parameter number. Nevertheless, I sometimes have = to override some methods (in Swing, for example). Those methods may have mo= re parameters than what the rule is configured to allow. I would like this = rule to be ignored when applied to an overridden method. Does it make sense? If so, how may I do this? I have looked at suppression = filters, but they work either with a configuration file (that you need to m= aintain) or keywords in the code (which makes you add to your files, text f= or a specific tool). Trying to write a custom filter, for what I have understood, it seems to al= low reaching text and the lines of it, but you do not have access to a stru= cture as you have in a check. I was worried that using some kind of text re= gexp on a line would be brittle. Thus I have written a custom check, inheriting from ParameterNumberCheck cl= ass. This works. But I would have to maintain it in my project locally for = future checkstyle releases. Thus, is there another better way to do it? Do you think this request should become a feature request? Thanks. R. ---------------------------------------------------------------------------= --- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat la= ndscape has changed and how IT managers can respond. Discussions will inclu= de endpoint security, mobile security and the latest in malware threats. ht= tp://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user ---------------------------------------------------------------------------= --- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and = threat landscape has changed and how IT managers can respond. Discussions = will include endpoint security, mobile security and the latest in malware = threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/