简体   繁体   English

关于缺少自定义Javadoc标签的警告

[英]Warning on missing custom javadoc tags

We create a custom Doclet for our projet to generate a specific documentation for our client. 我们为我们的项目创建自定义Doclet,以为客户生成特定的文档。

We define some specific tags that are parsed by the doclet when we generate the documentation. 我们定义了一些特定的标记,这些标记在生成文档时由doclet进行解析。

Do you know how to ask eclipse to add warning when those special tags are missing in our javadoc comments ? 当我们的javadoc注释中缺少那些特殊标记时,您知道如何要求eclipse添加警告吗?

Example of well formed javadoc: 格式正确的javadoc示例:

/**
 * @dialogName TECK-01-E-608
 * @useVO ServiceVO
 * @useVO AgentVO
 */
public class MyDialog extends BaseDialogImpl {
...

If @dialogName is missing, the developper should have a warning in eclipse... 如果缺少@dialogName,则开发人员应在日食中发出警告...

I look checkstyle a little bit, but I don't understand how to configure it to do such a thing. 我看上去有点像checkstyle,但是我不知道如何配置它来做这样的事情。

Thanks in advance for your help. 在此先感谢您的帮助。

That should be detected by the CheckStyle "WriteTag" tool. 应该由CheckStyle“ WriteTag”工具检测到。
(I know you have looked at CheckStyle: this answer is there to mention a possible configuration): (我知道您已经看过CheckStyle:此答案在那里提到了可能的配置):

<module name="WriteTag">
   <property name="tag" value="@dialogName"/>
   <property name="severity" value="warning"/> <!-- if not found, warning -->
   <property name="tagSeverity" value="ignore"/> <!-- if found, display nothing -->
</module>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM