Class NonEmptyAtclauseDescriptionCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public class NonEmptyAtclauseDescriptionCheck
    extends AbstractJavadocCheck

    Checks that the block tag is followed by description.

    To configure the default check that will check @param, @return, @throws, @deprecated:

     <module name="NonEmptyAtclauseDescription"/>
     

    Example:

     class Test
     {
     /**
     * Violation for param "b" and at tags "deprecated", "throws".
     * @param a Some javadoc // OK
     * @param b
     * @deprecated
     * @throws Exception
     */
     public int method(String a, int b) throws Exception
     {
     return 1;
     }
     }
     

    To configure the check to validate only @param and @return tags:

     <module name="NonEmptyAtclauseDescription">
       <property name="javadocTokens" value="PARAM_LITERAL,RETURN_LITERAL"/>
     </module>
     

    Example:

     class Test
     {
     /**
     * Violation for param "b". Tags "deprecated", "throws" are ignored.
     * @param a Some javadoc // OK
     * @param b
     * @deprecated
     * @throws Exception
     */
     public int method(String a, int b) throws Exception
     {
     return 1;
     }
     }
     

    Parent is com.puppycrawl.tools.checkstyle.TreeWalker

    Violation Message Keys:

    • javadoc.missed.html.close
    • javadoc.parse.rule.error
    • javadoc.wrong.singleton.html.tag
    • non.empty.atclause
    Since:
    6.0