Class InappropriateJavadocBlockTagsOnPackageCheck

All Implemented Interfaces:
Configurable, Contextualizable

public class InappropriateJavadocBlockTagsOnPackageCheck extends AbstractJavadocCheck
Checks that Javadoc block tags for package definitions do not contain tags that are semantically invalid for packages.

Package definitions do not have return types or throw declarations. Therefore, @return and @throws/@exception Javadoc block tags used in their Javadoc comments are considered inappropriate and should be removed or replaced with proper documentation.

Parent is com.puppycrawl.tools.checkstyle.TreeWalker

Violation Message Keys:

  • javadoc.inappropriate.tag
Since:
14.1.0
  • Field Details

    • MSG_INAPPROPRIATE_TAG

      public static final String MSG_INAPPROPRIATE_TAG
      A key is pointing to the warning message text in "messages.properties" file.
      See Also:
    • PACKAGE

      public static final String PACKAGE
      The package keyword for logging.
      See Also:
    • currentAst

      private DetailAST currentAst
      Java AST node whose attached Javadoc is currently being processed.
  • Constructor Details

    • InappropriateJavadocBlockTagsOnPackageCheck

      public InappropriateJavadocBlockTagsOnPackageCheck()
      Creates a new InappropriateJavadocBlockTagsOnPackageCheck instance.
  • Method Details