MissingJavadocPackage
Since Checkstyle 8.22
Description
Rationale: description and other related documentation for a package can be written up in the package-info.java file and it gets used in the production of the Javadocs. See link for more info.
This check specifically only validates package definitions. It will not validate any methods or interfaces declared in the package-info.java file.
Examples
To configure the check:
<module name="Checker">
<module name="TreeWalker">
<module name="MissingJavadocPackage"/>
</module>
</module>
Example1 of package-info.java:
/**
* Provides API classes
*/
package com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadocpackage.javadoc;
Example2 of package-info.java:
/*
* Block comment is not a javadoc
*/
package com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadocpackage.nojavadoc;
// violation above 'Missing javadoc for package-info.java file'
Example of Usage
Violation Messages
All messages can be customized if the default message doesn't suit you. Please see the documentation to learn how to.
Package
com.puppycrawl.tools.checkstyle.checks.javadoc