2012-05-28 14:17:44 -04:00
|
|
|
<?xml version="1.0"?>
|
2003-11-14 16:46:30 -05:00
|
|
|
|
2004-02-28 12:47:37 -05:00
|
|
|
<!--
|
2012-05-28 14:17:44 -04:00
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
|
|
|
|
|
|
|
|
<!-- commons math customization of default Checkstyle behavior -->
|
2003-11-14 16:46:30 -05:00
|
|
|
<module name="Checker">
|
|
|
|
<property name="localeLanguage" value="en"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
2003-11-14 16:46:30 -05:00
|
|
|
<module name="TreeWalker">
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Operator must be at end of wrapped line -->
|
2003-11-14 16:46:30 -05:00
|
|
|
<module name="OperatorWrap">
|
|
|
|
<property name="option" value="eol"/>
|
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- No if/else/do/for/while without braces -->
|
2011-06-26 14:42:32 -04:00
|
|
|
<module name="NeedBraces"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Interfaces must be types (not just constants) -->
|
2005-12-22 16:59:17 -05:00
|
|
|
<module name="InterfaceIsType"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
2014-09-22 08:02:52 -04:00
|
|
|
<!-- Must have class / interface header comments -->
|
|
|
|
<module name="JavadocType"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Require method javadocs, allow undeclared RTE -->
|
2009-04-19 14:05:48 -04:00
|
|
|
<module name="JavadocMethod">
|
|
|
|
<property name="allowUndeclaredRTE" value="true"/>
|
2014-01-30 04:37:31 -05:00
|
|
|
<property name="allowThrowsTagsForSubclasses" value="true"/>
|
2015-04-30 15:04:27 -04:00
|
|
|
<property name="validateThrows" value="false"/>
|
2009-04-19 14:05:48 -04:00
|
|
|
</module>
|
2014-01-30 04:37:31 -05:00
|
|
|
|
2012-05-28 14:17:44 -04:00
|
|
|
<!-- Require field javadoc -->
|
2009-04-19 14:05:48 -04:00
|
|
|
<module name="JavadocVariable"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- No public fields -->
|
2009-04-19 14:05:48 -04:00
|
|
|
<module name="VisibilityModifier">
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="protectedAllowed" value="true"/>
|
2005-12-22 16:59:17 -05:00
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Require hash code override when equals is -->
|
2009-04-19 14:05:48 -04:00
|
|
|
<module name="EqualsHashCode"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Disallow unnecessary instantiation of Boolean, String -->
|
2009-04-19 14:05:48 -04:00
|
|
|
<module name="IllegalInstantiation">
|
2005-12-22 16:59:17 -05:00
|
|
|
<property name="classes" value="java.lang.Boolean, java.lang.String"/>
|
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Required for SuppressionCommentFilter below -->
|
|
|
|
<module name="FileContentsHolder"/>
|
|
|
|
|
|
|
|
<!-- Import should be explicit, really needed and only from pure java packages -->
|
|
|
|
<module name="AvoidStarImport" />
|
|
|
|
<module name="UnusedImports" />
|
|
|
|
<module name="IllegalImport" />
|
|
|
|
|
|
|
|
<!-- Utility class should not be instantiated, they must have a private constructor -->
|
|
|
|
<module name="HideUtilityClassConstructor" />
|
|
|
|
|
|
|
|
<!-- Switch statements should be complete and with independent cases -->
|
|
|
|
<module name="FallThrough" />
|
|
|
|
<module name="MissingSwitchDefault" />
|
|
|
|
|
|
|
|
<!-- Constant names should obey the traditional all uppercase naming convention -->
|
|
|
|
<module name="ConstantName" />
|
|
|
|
|
|
|
|
<!-- Method parameters and local variables should not hide fields, except in constructors and setters -->
|
2009-09-01 15:12:50 -04:00
|
|
|
<module name="HiddenField">
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="ignoreConstructorParameter" value="true" />
|
|
|
|
<property name="ignoreSetter" value="true" />
|
2009-09-01 15:12:50 -04:00
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- No trailing whitespace -->
|
2009-09-05 13:36:48 -04:00
|
|
|
<module name="Regexp">
|
|
|
|
<property name="format" value="[ \t]+$"/>
|
2012-05-28 14:03:44 -04:00
|
|
|
<property name="illegalPattern" value="true"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="message" value="Trailing whitespace"/>
|
2009-09-05 13:36:48 -04:00
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- No System.out.println() statements -->
|
2009-09-05 14:11:50 -04:00
|
|
|
<module name="Regexp">
|
2012-05-28 14:17:44 -04:00
|
|
|
<!-- no sysouts -->
|
2009-09-05 14:11:50 -04:00
|
|
|
<property name="format" value="System\.out\.println"/>
|
|
|
|
<property name="illegalPattern" value="true"/>
|
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Authors should be in pom.xml file -->
|
2009-09-06 04:56:58 -04:00
|
|
|
<module name="Regexp">
|
|
|
|
<property name="format" value="@author"/>
|
2012-05-28 14:03:44 -04:00
|
|
|
<property name="illegalPattern" value="true"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="message" value="developers names should be in pom file"/>
|
2009-09-06 04:56:58 -04:00
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Use a consistent way to put modifiers -->
|
|
|
|
<module name="RedundantModifier" />
|
|
|
|
<module name="ModifierOrder" />
|
|
|
|
|
|
|
|
<!-- Use a consistent way to put declarations -->
|
|
|
|
<module name="DeclarationOrder" />
|
|
|
|
|
|
|
|
<!-- Don't add up parentheses when they are not required -->
|
|
|
|
<module name="UnnecessaryParentheses" />
|
|
|
|
|
|
|
|
<!-- Don't use too widespread catch (Exception, Throwable, RuntimeException) -->
|
|
|
|
<module name="IllegalCatch" />
|
|
|
|
|
|
|
|
<!-- Don't use = or != for string comparisons -->
|
|
|
|
<module name="StringLiteralEquality" />
|
|
|
|
|
|
|
|
<!-- Don't declare multiple variables in the same statement -->
|
|
|
|
<module name="MultipleVariableDeclarations" />
|
|
|
|
|
|
|
|
<!-- String literals more than one character long should not be repeated several times -->
|
|
|
|
<!-- the "unchecked" string is also accepted to allow @SuppressWarnings("unchecked") -->
|
|
|
|
<module name="MultipleStringLiterals" >
|
|
|
|
<property name="ignoreStringsRegexp" value='^(("")|(".")|("unchecked"))$'/>
|
2009-10-16 10:51:55 -04:00
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
2015-02-25 16:49:13 -05:00
|
|
|
<!-- Check if @Override tags are present -->
|
|
|
|
<module name="MissingOverride" />
|
|
|
|
|
2012-05-28 14:17:44 -04:00
|
|
|
<!-- <module name="TodoComment" /> -->
|
|
|
|
|
2003-11-14 16:46:30 -05:00
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Verify that EVERY source file has the appropriate license -->
|
2011-10-02 05:58:38 -04:00
|
|
|
<module name="Header">
|
|
|
|
<property name="headerFile" value="${checkstyle.header.file}"/>
|
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- No tabs allowed! -->
|
2011-10-02 05:58:38 -04:00
|
|
|
<module name="FileTabCharacter"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Require files to end with newline characters -->
|
2009-09-05 14:00:17 -04:00
|
|
|
<module name="NewlineAtEndOfFile"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Require package javadoc -->
|
2011-10-02 05:58:38 -04:00
|
|
|
<module name="JavadocPackage"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
|
|
|
|
<!-- Setup special comments to suppress specific checks from source files -->
|
2010-07-30 16:16:18 -04:00
|
|
|
<module name="SuppressionCommentFilter">
|
|
|
|
<property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocVariable"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="onCommentFormat" value="CHECKSTYLE\: resume JavadocVariable"/>
|
|
|
|
<property name="checkFormat" value="JavadocVariable"/>
|
2010-07-30 16:16:18 -04:00
|
|
|
</module>
|
2008-05-21 08:58:15 -04:00
|
|
|
<module name="SuppressionCommentFilter">
|
|
|
|
<property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocMethodCheck"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="onCommentFormat" value="CHECKSTYLE\: resume JavadocMethodCheck"/>
|
|
|
|
<property name="checkFormat" value="JavadocMethodCheck"/>
|
2008-05-21 08:58:15 -04:00
|
|
|
</module>
|
2009-09-01 15:47:46 -04:00
|
|
|
<module name="SuppressionCommentFilter">
|
|
|
|
<property name="offCommentFormat" value="CHECKSTYLE\: stop ConstantName"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="onCommentFormat" value="CHECKSTYLE\: resume ConstantName"/>
|
|
|
|
<property name="checkFormat" value="ConstantName"/>
|
2009-09-01 15:47:46 -04:00
|
|
|
</module>
|
2009-09-06 11:32:50 -04:00
|
|
|
<module name="SuppressionCommentFilter">
|
|
|
|
<property name="offCommentFormat" value="CHECKSTYLE\: stop HideUtilityClassConstructor"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="onCommentFormat" value="CHECKSTYLE\: resume HideUtilityClassConstructor"/>
|
|
|
|
<property name="checkFormat" value="HideUtilityClassConstructor"/>
|
2009-09-06 11:32:50 -04:00
|
|
|
</module>
|
2010-03-27 14:59:39 -04:00
|
|
|
<module name="SuppressionCommentFilter">
|
|
|
|
<property name="offCommentFormat" value="CHECKSTYLE\: stop MultipleVariableDeclarations"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="onCommentFormat" value="CHECKSTYLE\: resume MultipleVariableDeclarations"/>
|
|
|
|
<property name="checkFormat" value="MultipleVariableDeclarations"/>
|
2010-03-27 14:59:39 -04:00
|
|
|
</module>
|
2011-10-07 03:25:51 -04:00
|
|
|
<module name="SuppressionCommentFilter">
|
|
|
|
<property name="offCommentFormat" value="CHECKSTYLE\: stop IllegalCatch"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="onCommentFormat" value="CHECKSTYLE\: resume IllegalCatch"/>
|
|
|
|
<property name="checkFormat" value="IllegalCatch"/>
|
2011-10-07 03:25:51 -04:00
|
|
|
</module>
|
2011-10-07 03:26:26 -04:00
|
|
|
<module name="SuppressionCommentFilter">
|
|
|
|
<property name="offCommentFormat" value="CHECKSTYLE\: stop DeclarationOrder"/>
|
2012-05-28 14:17:44 -04:00
|
|
|
<property name="onCommentFormat" value="CHECKSTYLE\: resume DeclarationOrder"/>
|
|
|
|
<property name="checkFormat" value="DeclarationOrder"/>
|
2011-10-07 03:26:26 -04:00
|
|
|
</module>
|
2015-11-02 10:20:54 -05:00
|
|
|
<module name="SuppressionCommentFilter">
|
|
|
|
<property name="offCommentFormat" value="CHECKSTYLE\: stop RedundantModifier"/>
|
|
|
|
<property name="onCommentFormat" value="CHECKSTYLE\: resume RedundantModifier"/>
|
|
|
|
<property name="checkFormat" value="RedundantModifier"/>
|
|
|
|
</module>
|
2012-02-16 01:43:33 -05:00
|
|
|
<module name="SuppressionCommentFilter">
|
|
|
|
<property name="offCommentFormat" value="CHECKSTYLE\: stop all"/>
|
|
|
|
<property name="onCommentFormat" value="CHECKSTYLE\: resume all"/>
|
|
|
|
</module>
|
2003-11-14 16:46:30 -05:00
|
|
|
</module>
|
2012-05-28 14:17:44 -04:00
|
|
|
|