当javadoc和@param之间没有空行时,如何使checkstyle失败
例如,我有下面的代码。我想让checkstyle抱怨,因为我的顶级javadoc注释和@子句之间没有空行当javadoc和@param之间没有空行时,如何使checkstyle失败,java,javadoc,checkstyle,Java,Javadoc,Checkstyle,例如,我有下面的代码。我想让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 li
/**
* 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已经确认我启用了JavadocParague
<module name="JavadocParagraph"/>
检查应确保:。只需将以下内容添加到checkstyle配置中:
<module name="JavadocParagraph"/>
我应用了你的建议,但我仍然没有得到javadoc警告。我仔细阅读了文档,看到“两段之间各有一个空行,如果存在at子句块,则在at子句块之前有一个空行。”不确定javadoc为什么没有抱怨我的示例。这是checkstyle中的一个错误,请参阅。我选择了这个答案,因为它通过遵循文档在技术上是正确的。不幸的是,它还不起作用。我针对github上的checkstyle项目提交了该bug。其中,它说您必须有一个空行?…如果存在,则在at子句块之前有一个空行。”