Class RequireEmptyLineBeforeBlockTagGroupCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public class RequireEmptyLineBeforeBlockTagGroupCheck
    extends AbstractJavadocCheck

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

    • Property violateExecutionOnNonTightHtml - Control when to print violations if the Javadoc being examined by this check violates the tight html rules defined at Tight-HTML Rules. Type is boolean. Default value is false.

    To configure the check:

     <module name="RequireEmptyLineBeforeBlockTagGroup"/>
     

    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;
      }
      

    Parent is com.puppycrawl.tools.checkstyle.TreeWalker

    Violation Message Keys:

    • javadoc.missed.html.close
    • javadoc.parse.rule.error
    • javadoc.tag.line.before
    • javadoc.wrong.singleton.html.tag
    Since:
    8.36
    • Field Detail

      • MSG_JAVADOC_TAG_LINE_BEFORE

        public static final java.lang.String MSG_JAVADOC_TAG_LINE_BEFORE
        The key in "messages.properties" for the message that describes a tag in javadoc requiring an empty line before it.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RequireEmptyLineBeforeBlockTagGroupCheck

        public RequireEmptyLineBeforeBlockTagGroupCheck()