RequireEmptyLineBeforeBlockTagGroup

Since Checkstyle 8.36

Description

Checks that one blank line before the block tag if it is present in Javadoc.

Properties

name description type default value since
violateExecutionOnNonTightHtml Control when to print violations if the Javadoc being examined by this check violates the tight html rules defined at Tight-HTML Rules. boolean false 8.36

Examples

To configure the check:

<module name="Checker">
  <module name="TreeWalker">
    <module name="RequireEmptyLineBeforeBlockTagGroup"/>
  </module>
</module>
        

By default, the check will report a violation if there is no blank line before the block tag, like in the example below.

/**
 * testMethod's javadoc.
 * @return something (violation)
 */
public boolean testMethod() {
    return false;
}
        

Valid javadoc should have a blank line separating the parameters, return, throw, or other tags like in the example below.

/**
* testMethod's javadoc.
*
* @param firstParam
* @return something
*/
public boolean testMethod(int firstParam) {
    return false;
}
        

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