views:

1085

answers:

1

I use checkstyle to analyze my code. A useful rule is PackageHtml, that checks, if a package contains a Javadoc-description. But with newer java-version it's recommended to use package-info.java instead of package.html. Problem is, checkstyle ignores the package-info.java and reports a rule violation. How can checkstyle be configured to check for package-documentation, but accepts package.html and package-info.java?

+3  A: 

What version of CheckStyle are you using ?

It seems to be an old bug closed late 2007.

Actually, the documentation mentions package-info as being the default!... but only with CheckStyle 5.x beta, not 4.4

The announce for CheckStyle5.0 beta1 is here.
CheckStyle 4.4 is the last one compatible with jdk1.4

VonC
I use the stable version. You say that this works in the upcoming release? That would be cool. Then I can't wait for the new version.
Mnementh
Yes, the checkstyle 5.5 is more JDK5 or JDK6 oriented, but I believe you can use it right now.
VonC
Thanks, it works fine. As I don't want rely too much on beta-version, I hope they will move fast to the final release.
Mnementh
Thank you for this positive feedback. I will update this post as soon as checkstyle 5.0 will be officially released.
VonC