Search code examples
javajavadoccheckstyle

How do I get checkstyle to fail when there is no blank line between javadoc and @param


For instance, I have the code below. I want checkstyle to complain because there is no blank line between my top level javadoc comment and my @ clauses.

/**
 * This line or the next line should fail checkstyle.
 * @param param is essential
 * @throws Exception is thrown when something bad happens
 */

Checkstyle should not complain when the javadoc is changed to look like:

/**
 * This line or the next line should no longer fail.
 * 
 * @param param is essential
 * @throws Exception is thrown when something bad happens
 */

I tried using @Mureinik 's suggestion and it does not complain about my lack of blank line between the first paragraph and the @-clauses. I verified that eclipse has recognized that I enabled JavadocParagraph in the screenshot below.

<module name="JavadocParagraph"/>

enter image description here


Solution

  • This is now available with

    <module name="RequireEmptyLineBeforeBlockTagGroup"/>