Re: Empty line check

Lars Kühne <[email protected]> Fri, 6 Feb 2009 20:56:59 +0100
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <[email protected]>
On Fri, Feb 6, 2009 at 8:32 PM, mgryszko <[email protected]> wrote:

>
> Exactly, I mean one or more consecutive lines. Is there a way to
> differentiate between methods and e.g. class members? AbstractFileSetCheck
> gets a File array as input.
>
> Marcin
>

If you need to account for the java syntax structure, FileSetCheck won't cut
it - you'll need to implment a Check then. This makes things a bit more
complicated, but still relatively easy. You can then register your check for
the node types that are interesting for you, like METHOD_DEF. Have a look at
checkstyle's MethodLengthCheck code for a simple example.

Cheers,
Lars

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user