Configured checkstyle to stop complaining about incomplete Javadoc in some very specific cases.

This problem has been discussed previously here:
  http://markmail.org/message/pmbiyiqssjesq7tm

The solution implemented with this modification is to configure checkstyle
in such a way the errors can be filtered out using dedicated comments in the
source code:

  // CHECKSTYLE: stop JavadocMethodCheck

  // a bunch of functions known to trigger warnings
  // that we explicitly REFUSE to fix

  // CHECKSTYLE: resume JavadocMethodCheck

The checks are still performed normally in file parts not bracketed by
these comments. Hence the first few methods in o.a.c.m.stat.inference.TestUtils are
still checked for correct javadoc, and only for the last ones in the same files
are the checks relaxed.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@658671 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2008-05-21 12:58:15 +00:00
parent 69af448345
commit 93a8bb4f13
2 changed files with 16 additions and 0 deletions

View File

@ -67,9 +67,21 @@
<module name="IllegalInstantiation"> <module name="IllegalInstantiation">
<property name="classes" value="java.lang.Boolean, java.lang.String"/> <property name="classes" value="java.lang.Boolean, java.lang.String"/>
</module> </module>
<!-- Required for SuppressionCommentFilter below -->
<module name="FileContentsHolder"/>
</module> </module>
<!-- Require package javadoc --> <!-- Require package javadoc -->
<module name="PackageHtml"/> <module name="PackageHtml"/>
<!-- Setup special comments to suppress specific checks from source files -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocMethodCheck"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume JavadocMethodCheck"/>
<property name="checkFormat" value="JavadocMethodCheck"/>
</module>
</module> </module>

View File

@ -128,6 +128,8 @@ public class TestUtils {
} }
// CHECKSTYLE: stop JavadocMethodCheck
/** /**
* @see org.apache.commons.math.stat.inference.TTest#homoscedasticT(double[], double[]) * @see org.apache.commons.math.stat.inference.TTest#homoscedasticT(double[], double[])
*/ */
@ -407,4 +409,6 @@ public class TestUtils {
return oneWayAnova.anovaTest(categoryData, alpha); return oneWayAnova.anovaTest(categoryData, alpha);
} }
// CHECKSTYLE: resume JavadocMethodCheck
} }