tags:

views:

320

answers:

1

Hi all,

I am in the process of converting my checkstyle version 4.0 configurations to version 5.0. Hence, I have added the following to replace older "PackageHtml",

<module name="JavadocPackage"> <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="info"/> <property name="allowLegacy" value="true"/> <property name="severity" value="info"/> </module>

What happens is, I get a info message saying "Missing package-info.java" even though I have the following comments on top of my java file,

/* * File: Test.java * System: PF Tools * Module: com.research.usage * Author: jadaaih * Copyright: Jadaaih * Last modified by: jadaaih * Date: 2009-03-02 15:30:24 * Version: 1.1 * Description: * Preconditions: */

I am sorry the display is distorted, the comments have newline at the end.

Please advise on how to get rid of that checkstyle info message in Checkstyle 5.0 compliant with 4.0.

Thanks, J

A: 

Browsing the documentation it looks to me that your metadata element is pointless. Perhaps it even provokes the checkstyle parser to ignore the JavadocPackage configuration.

Also, when the allowLegacy property is set (it's false by default), you specify that you want to use a package.html file. It is not allowed to have both a package.html and package-info.java files.

Edit:

I have just tested the above. It seems that the error is misleading. What it actually means is that a package.html file is missing :) Just add it and the warning will disappear.

driekken

related questions