Re: igonre System.out in main()

"Oliver Burn" <[email protected]>
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.