Re: igonre System.out in main()
"Srilakshmanan, Lakshman" <[email protected]>
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks Lakshman _____ From: [email protected] [mailto:[email protected]] On Behalf Of Oliver Burn Sent: Monday, 23 April 2007 1:25 PM To: [email protected] Subject: Re: [Checkstyle-user] igonre System.out in main() Yes - the documentation on the home page is the best source. Also look at the code for the existing checks. Good luck, and have fun! On 4/23/07, Srilakshmanan, Lakshman <[email protected]> wrote: Hi Oliver, Thank you very much for your response. I thought that may be the only option. Could you be kind enough to direct me to any links that describe an implementation or do you believe that the document on the checkstyle home page (Writing Checks) is the best source. Thanks Lakshman ________________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Oliver Burn Sent: Monday, 23 April 2007 1:10 PM To: [email protected] Subject: Re: [Checkstyle-user] igonre System.out in main() You would have to write a custom check to detect when in a main method, so as to suppress errors when not in a main method. On 4/23/07, Srilakshmanan, Lakshman <[email protected]> wrote: Hi, I implemented a check to detect System.out, but the problem is I need to have this facility in the main() method as suggestions need to be reported to the operator at the console. Alternative 1 ------------- I could use System.err but once the developers get wind of this they will abuse it. Alternative 2 ------------- I could use suppression filters to ignore these files/lines. This will become a maintenance nightmare, as the number of files start growing and line numbers keep changing. I am looking for a check that will ignore System.out only in the main() method. I will be interested to know from anyone who has a work around. Any help is greatly appreciated. Thanks Lakshman ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user