问题
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