hyperman
hyperman

Reputation: 1344

checkstyle JavadocType only on interfaces

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?

Upvotes: 4

Views: 880

Answers (1)

Sean Patrick Floyd
Sean Patrick Floyd

Reputation: 299038

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>

Upvotes: 6

Related Questions