Re: [Checkstyle-commits] Help in Writing Checks

"Lars Kühne" <[email protected]> Sun, 7 Dec 2008 13:39:34 +0100
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <[email protected]>
Hi Cookie,

this is a fairly complex task. You would have to implement a FileSetCheck
that is similar to the TreeWalker class that is distributed with Checkstyle.
That FileSetCheck (let's call it AspectJWalker) would parse the .aj files
and build a syntax tree, then submodules of AspectJWalker would check for
error conditions in that syntax tree.

This is very simliar to how Checkstyle works for java code, so you can have
a look at the Checkstyle sources for the details. Start with the Checker,
TreeWalker and Check classes.

Probably the most difficult part is finding a grammar for the aspectj
syntax. Let us know how you go.

Cheers,
Lars

PS: Please post to the user list, not the commit list.

On Fri, Dec 5, 2008 at 6:30 PM, Cookie Watkins wrote:

>  I need help in writing checks.  I would like to write checks to detect
> errors associated with AspectJ.  For example, how would I write a check to
> check for incorrect pointcut names (using call when execution should be
> used)?
>
> Cookie
>

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/

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