Take a lok at:

http://jakarta.apache.org/ant/external.html

There is a link there for Importscrubber.. it is just what you want.

I tried it myself and found it to be a nice tool. It does clean up import
statements, but sometimes sources will fail to compile afterwards. In my
case it happened in classes where I was using objects with same name like
java.util.Date and java.sql.Date. importscrubber thought I should import
both, which caused ambiguity and the compiler complained. Easily fixed
though.

I suggest running it against a copy of your sources to be safe and decide
for yourself if you like what you see.


Ylan.
>  -----Original Message-----
> From:         Matthew Pullen [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 14, 2002 5:49 PM
> To:   [EMAIL PROTECTED]
> Subject:      Code format validation
>
> Hello,
>       As with all projects, they tend to change a bit over time.  This leaves
you with unused import statments all over the place. I don't like the import
blah.* format either.  I was curious if there is an automated way to check
this in particular using ant, or an add in to ant?  I have tried using
checkstyle, but it doesn't appear to work with 1.4.
>
> Matthew Pullen << File: ATT00013.txt >>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to