Since Checkstyle 8.22
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.
To configure the check:
<module name="Checker"> <module name="TreeWalker"> <module name="MissingJavadocPackage"/> </module> </module>
Example:
/** * Provides API classes */ package com.checkstyle.api; // no violation /* * Block comment is not a javadoc */ package com.checkstyle.api; // violation
All messages can be customized if the default message doesn't suit you. Please see the documentation to learn how to.
com.puppycrawl.tools.checkstyle.checks.javadoc