gpt4 book ai didi

java - 当 javadoc 和 @param 之间没有空行时,如何使 checkstyle 失败

转载 作者:行者123 更新时间:2023-11-30 02:00:14 26 4
gpt4 key购买 nike

例如,我有下面的代码。我希望 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 的建议,它并没有提示我在第一段和 @-clauses 之间缺少空行。我验证了 Eclipse 已识别出我在下面的屏幕截图中启用了 JavadocParagraph。

<module name="JavadocParagraph"/>

enter image description here

最佳答案

JavadocParagraph检查应确保。只需将以下内容添加到您的 checkstyle 配置中:

<module name="JavadocParagraph"/>

关于java - 当 javadoc 和 @param 之间没有空行时,如何使 checkstyle 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53125176/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com