例如,我有下面的代码。我想要 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"/>