Author: luc Date: Wed May 21 05:58:15 2008 New Revision: 658671 URL: http://svn.apache.org/viewvc?rev=658671&view=rev Log: 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. Modified: commons/proper/math/branches/MATH_2_0/checkstyle.xml commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/inference/TestUtils.java Modified: commons/proper/math/branches/MATH_2_0/checkstyle.xml URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/checkstyle.xml?rev=658671&r1=658670&r2=658671&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/checkstyle.xml (original) +++ commons/proper/math/branches/MATH_2_0/checkstyle.xml Wed May 21 05:58:15 2008 @@ -67,9 +67,21 @@ <module name="IllegalInstantiation"> <property name="classes" value="java.lang.Boolean, java.lang.String"/> </module> + + <!-- Required for SuppressionCommentFilter below --> + <module name="FileContentsHolder"/> + </module> <!-- Require package javadoc --> <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> Modified: commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/inference/TestUtils.java URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/inference/TestUtils.java?rev=658671&r1=658670&r2=658671&view=diff ============================================================================== --- commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/inference/TestUtils.java (original) +++ commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/stat/inference/TestUtils.java Wed May 21 05:58:15 2008 @@ -128,6 +128,8 @@ } + // CHECKSTYLE: stop JavadocMethodCheck + /** * @see org.apache.commons.math.stat.inference.TTest#homoscedasticT(double[], double[]) */ @@ -407,4 +409,6 @@ return oneWayAnova.anovaTest(categoryData, alpha); } + // CHECKSTYLE: resume JavadocMethodCheck + }
