checkstyle JavadocType only on interfaces

冷暖自知 提交于 2019-12-23 12:29:40

问题


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?


回答1:


This sounds like the right thing:

tokens
definitions to check subset of tokens INTERFACE_DEF, CLASS_DEF

Try this:

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


来源:https://stackoverflow.com/questions/6744548/checkstyle-javadoctype-only-on-interfaces

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!