当 javadoc 和 @param 之间没有空行时,如何使 checkstyle 失败
How do I get checkstyle to fail when there is no blank line between javadoc and @param
例如,我有下面的代码。我想让 checkstyle 抱怨,因为在我的顶级 javadoc 注释和我的 @ 子句之间没有空行。
/**
* This line or the next line should fail checkstyle.
* @param param is essential
* @throws Exception is thrown when something bad happens
*/
当 javadoc 更改为如下所示时,Checkstyle 不应抱怨:
/**
* This line or the next line should no longer fail.
*
* @param param is essential
* @throws Exception is thrown when something bad happens
*/
我尝试使用@Mureinik 的建议,它没有抱怨我在第一段和@-从句之间缺少空行。我确认 eclipse 已经识别出我在下面的屏幕截图中启用了 JavadocParagraph。
<module name="JavadocParagraph"/>
JavadocParagraph
检查应该确保这一点。只需将以下内容添加到您的 checkstyle 配置中:
<module name="JavadocParagraph"/>
例如,我有下面的代码。我想让 checkstyle 抱怨,因为在我的顶级 javadoc 注释和我的 @ 子句之间没有空行。
/**
* This line or the next line should fail checkstyle.
* @param param is essential
* @throws Exception is thrown when something bad happens
*/
当 javadoc 更改为如下所示时,Checkstyle 不应抱怨:
/**
* This line or the next line should no longer fail.
*
* @param param is essential
* @throws Exception is thrown when something bad happens
*/
我尝试使用@Mureinik 的建议,它没有抱怨我在第一段和@-从句之间缺少空行。我确认 eclipse 已经识别出我在下面的屏幕截图中启用了 JavadocParagraph。
<module name="JavadocParagraph"/>
JavadocParagraph
检查应该确保这一点。只需将以下内容添加到您的 checkstyle 配置中:
<module name="JavadocParagraph"/>