MissingJavadocPackage

Since Checkstyle 8.22

Description

Checks for missing package definition Javadoc comments in package-info.java files.

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>
        

Example:

/**
* Provides API classes
*/
package com.checkstyle.api; // no violation
/*
* Block comment is not a javadoc
*/
package com.checkstyle.api; // violation
        

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

Parent Module

TreeWalker