Dmitry Dmitry - 2 days ago 5
Java Question

How to disable checkstyle JavaDoc validation for constructors?

How to disable checkstyle JavaDoc validation for constructors?

I see that http://checkstyle.sourceforge.net/config_javadoc.html#JavadocMethod states clearly that it "Checks the Javadoc of a method or constructor", however I need to exclude constructors and leave only methods.

Answer

In order to ignore constructors, set the tokens property to METHOD_DEF:

<module name="JavadocMethod">
  <property name="tokens" value="METHOD_DEF"/>
</module>
Comments