我有以下JavaDoc,带有<p>
分隔符,但(1)没有空行,并且(2)<p>
之后的文本继续在下一行,所有这些都是正常。
/**
* Fetches a list of Org beans based on the provided org code.
* <p>
* Note: This also takes care of Parent/Child orgs.
*
* @param org Organization string
* @return List of Org beans
* @throws Exception
*/
List<Org> loadOrgs(String org) throws Exception;
在CheckStyle中,我的配置为per the spec,以实现<p>
格式的完全灵活性:
<module name="JavadocParagraph">
<property name="allowNewlineParagraph" value="true"/>
</module>
但是刷新后,CheckStyle仍然报告<p>
有2个问题:
- <p> tag should be preceded with an empty line.
- <p> tag should be placed immediately before the first word, with no space after
有什么主意要摆脱这两种情况吗?
答案 0 :(得分:0)
在 IntelliJ IDEA 2020 中,选择/突出显示有问题的注释并重新格式化(Shift + Command + L)。