仅在接口上使用checkstyle JavadocType [英] checkstyle JavadocType only on interfaces

查看:257
本文介绍了仅在接口上使用checkstyle JavadocType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们淹没在数千种Checkstyle规则中时,我想放宽它们(如果只是阻止开发人员忽略它们)。我要放松的规则之一是 JavaDocType 检查:仅在接口上才应使用javadoc强制性的,不在其他公共类上。不幸的是,我没有看到范围的界面。

As we are drowning in thousands of checkstyle rules, I want to relax them (if only to stop devs from ignoring them). One of the rules I want to relax is the JavaDocType check: Only on interfaces should javadoc be mandatory, not on other public classes. Unfortunately, I don't see an 'interface' Scope. Has anyone a suggestion to make this possible without writing our own check?

推荐答案

这听起来像是对的事情:

This sounds like the right thing:


令牌

定义以检查令牌子集 INTERFACE_DEF CLASS_DEF

尝试以下操作:

<module name="JavadocType">
   <property name="tokens" value="INTERFACE_DEF"/>
</module>

这篇关于仅在接口上使用checkstyle JavadocType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆