Re: [Checkstyle-commits] Help in Writing Checks

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Checkstyle-commits] Help in Writing Checks

Lars Kühne-3
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: [Checkstyle-commits] Help in Writing Checks

Lars Kühne-3
Hi Cookie,

sorry for not responding earlier. The checkstyle source code is managed in a subversion source code repository. Instructions for getting the source code are here:
http://sourceforge.net/svn/?group_id=29721

You could also download pre-packaged src packages from the sourceforge project download pages, although I'm not sure whether that would be sufficient to actually build checkstyle from source:
http://sourceforge.net/project/showfiles.php?group_id=29721

Cheers,
Lars


Hi Lars:

 

Thanks for the response, and sorry I posted to the wrong list.  I believe the task you describe below is well beyond my skill level.  I am not a programmer although I've had to do a little for course requirements.  I'm a recent novice with Java and AspectJ, and not very good at either.  Where can I obtain the Checkstyle sources?

 

Cookie

 



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user