Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#477 Add option to exclude @Test with JavadocMethodCheck

Future
closed
Oliver Burn
Check (274)
5
2012-10-10
2008-02-27
deusi
No

we've some reasonable amount of JUnit4 test classes and methods for which we do not wrote any Javadoc comment.

How about an additional option for the JavadocMethodCheck to suppress a "missing Javadoc warning" on an annotated ("@Test") method?

Discussion

  • Oliver Burn
    Oliver Burn
    2008-03-04

    Logged In: YES
    user_id=218824
    Originator: NO

    A simple approach that you can use now is to use the SuppressionFilter. It can be activated like:

    <module name="SuppressionFilter">
    <property name="file" value="${project_loc}/build/config/checkstyle/project-suppressions.xml"/>
    </module>

    In the suppressions file, you can turn off JavadocMethod checks for test code. For example:

    <suppressions>

    <suppress checks="JavadocMethod" files="&lt;span&gt;[/klzzwxh:0008]&lt;/span&gt;test&lt;span&gt;[/klzzwxh:0009]&lt;/span&gt;src&lt;span&gt;[/klzzwxh:0010]&lt;/span&gt;java&lt;span&gt;[/klzzwxh:0011]&lt;/span&gt;"/>
    </suppressions>

    As such I do not propose to add support for the annotation (unless there is strong demand).

     
  • Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).