Re: cannot force NO-whitespace after if, while, catch, for...

Oliver Burn <[email protected]> Sat, 12 Dec 2009 17:26:10 +1100
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <[email protected]>
Sounds like problems with using the Eclipse plug-in. Suggest asking in their
project forums at https://sourceforge.net/projects/eclipse-cs/forums

On Wed, Dec 2, 2009 at 05:03, Reagan Penner <[email protected]>wrote:

>  Hello,
>
>
>
> I am using the Eclipse Checkstyle Plug-in 5.0.3.200911042225 and am having
> issues trying to force no-whitespace after a keyword like if, while, for,
> catch.
>
>
>
> In my "Whitespace Around" checkstyle rule I have unchecked the if, for,
> catch, while, do, and try keywords.
>
>
>
> However, neither of these code segments will generate a checkstyle
> violation (they both seem to be considered valid):
>
>
>
> if ( !retry )
>
> {
>
>     //read a new message and try to send it on
>
>     ...
>
> }
>
>
>
> if( !retry )
>
> {
>
>     //read a new message and try to send it on
>
>     ...
>
> }
>
>
>
> If I go back into the "Whitespace Around" checkstyle rule and check the "if
> keyword" box then the second scenario from above i.e., no-space generates
> the following violation:
>
>
>
> 'if' is not followed by whitespace.
>
>
>
> I would really like to be able to enforce the following as a violation:
> 'if' is followed by whitespace.
>
>
>
> I did read through your posts and it appears that there were similar issues
> with earlier versions of checkstyle. If I am missing something please do let
> me know but as far as I can tell I am running the latest available version.
>
>
>
> Cheers,
>
> -reagan
>
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> Checkstyle-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/checkstyle-user
>
>

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev

_______________________________________________
Checkstyle-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user