hibernate-orm/shared/config/checkstyle/checkstyle.xml

235 lines
9.7 KiB
XML
Raw Normal View History

2013-04-08 15:27:47 -04:00
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
~ Copyright (c) 2013, Red Hat Inc. or third-party contributors as
~ indicated by the @author tags or express copyright attribution
~ statements applied by the authors. All third-party contributions are
~ distributed under license by Red Hat Inc.
~
~ This copyrighted material is made available to anyone wishing to use, modify,
~ copy, or redistribute it subject to the terms and conditions of the GNU
~ Lesser General Public License, as published by the Free Software Foundation.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
~ for more details.
~
~ You should have received a copy of the GNU Lesser General Public License
~ along with this distribution; if not, write to:
~ Free Software Foundation, Inc.
~ 51 Franklin Street, Fifth Floor
~ Boston, MA 02110-1301 USA
-->
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="TreeWalker">
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
General regex checks as part of the TreeWalker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="RegexpSinglelineJava">
<property name="ignoreComments" value="true" />
<property name="format" value="^\t* +\t*\S" />
<property name="message" value="Line has leading space characters; indentation should be performed with tabs only." />
</module>
2013-04-08 15:27:47 -04:00
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Annotation checks
See http://checkstyle.sourceforge.net/config_annotation.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
2013-04-08 15:27:47 -04:00
<module name="MissingDeprecated" />
<module name="MissingOverride" />
<module name="PackageAnnotation" />
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Block checks
See http://checkstyle.sourceforge.net/config_blocks.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
2013-04-08 15:27:47 -04:00
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true" />
<property name="severity" value="warning" />
</module>
<module name="NeedBraces" />
<module name="LeftCurly">
<property name="option" value="eol" />
</module>
<module name="RightCurly">
<property name="option" value="alone" />
</module>
2013-04-08 15:27:47 -04:00
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Design checks
See http://checkstyle.sourceforge.net/config_design.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
2013-11-23 01:06:06 -05:00
<module name="HideUtilityClassConstructor">
<!-- Some classes in o.h.metamodel on master do this -->
<property name="severity" value="warning" />
</module>
2013-04-08 15:27:47 -04:00
<module name="MutableException" />
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Coding checks
See http://checkstyle.sourceforge.net/config_coding.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
2013-11-23 01:06:06 -05:00
<module name="EmptyStatement">
<property name="severity" value="warning" />
</module>
2013-04-08 15:27:47 -04:00
<module name="EqualsHashCode" />
2013-11-23 22:30:05 -05:00
<module name="FinalLocalVariable">
<property name="severity" value="warning" />
</module>
2013-11-23 01:06:06 -05:00
<module name="MissingSwitchDefault">
<property name="severity" value="warning" />
</module>
<module name="DefaultComesLast" />
<module name="ModifiedControlVariable">
<property name="severity" value="warning" />
</module>
2013-04-08 15:27:47 -04:00
<module name="SimplifyBooleanExpression" />
<module name="SimplifyBooleanReturn" />
<module name="StringLiteralEquality" />
<module name="NoFinalizer" />
2013-11-23 01:06:06 -05:00
<module name="ExplicitInitialization">
<property name="severity" value="warning" />
</module>
2013-04-08 15:27:47 -04:00
<module name="FallThrough" />
<module name="OneStatementPerLine" />
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Import checks
See http://checkstyle.sourceforge.net/config_imports.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
2013-04-08 15:27:47 -04:00
<module name="AvoidStarImport" />
<module name="RedundantImport" />
<module name="UnusedImports" />
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Misc checks
See http://checkstyle.sourceforge.net/config_misc.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
2013-04-08 15:27:47 -04:00
<module name="UpperEll" />
2013-11-23 01:06:06 -05:00
<module name="ArrayTypeStyle">
<!-- Some classes in o.h.metamodel on master do this -->
<property name="severity" value="warning" />
</module>
<module name="TrailingComment">
<property name="severity" value="warning" />
</module>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modifier checks
See http://checkstyle.sourceforge.net/config_modifier.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
2013-04-08 15:27:47 -04:00
<module name="ModifierOrder"/>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Naming checks
See http://checkstyle.sourceforge.net/config_naming.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="AbstractClassName">
<!-- we are just using this to make sure that classes matching the pattern (Abstract*) have the abstract modifier -->
<property name="format" value="^Abstract.*$" />
<property name="ignoreName" value="true" />
</module>
2013-11-23 01:06:06 -05:00
<module name="ClassTypeParameterName">
<property name="format" value="^[A-Z][A-Z0-9]*$" />
</module>
2013-04-08 15:27:47 -04:00
<module name="ConstantName">
<property name="format" value="^[A-Z](_?[A-Z0-9]+)*$|log" />
2013-11-23 01:06:06 -05:00
<!-- Some classes in o.h.metamodel on master violate this -->
<property name="severity" value="warning" />
</module>
2013-11-24 16:20:45 -05:00
<module name="LocalFinalVariableName" />
<module name="LocalVariableName">
<!-- Some classes in o.h.metamodel on master violate this -->
2013-11-23 01:06:06 -05:00
<property name="severity" value="warning" />
2013-04-08 15:27:47 -04:00
</module>
<module name="MemberName" />
<!--
The org.hibernate.engine.spi.ManagedEntity method names (prefixed with '&&_') muck with this
2013-04-08 15:27:47 -04:00
<module name="MethodName" />
-->
2013-04-08 15:27:47 -04:00
<module name="MethodTypeParameterName" />
<module name="PackageName" />
<module name="ParameterName" />
<module name="StaticVariableName" />
<module name="TypeName" />
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Whitespace checks
See http://checkstyle.sourceforge.net/config_whitespace.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
2013-04-08 15:27:47 -04:00
<module name="MethodParamPad" />
<module name="TypecastParenPad" />
<module name="ParenPad">
<property name="tokens" value="CTOR_CALL, METHOD_CALL, SUPER_CTOR_CALL" />
<property name="option" value="space" />
</module>
2013-04-08 15:27:47 -04:00
</module>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Javadoc checks
See http://checkstyle.sourceforge.net/config_javadoc.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="JavadocPackage">
<property name="allowLegacy" value="true" />
</module>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Misc checks
See http://checkstyle.sourceforge.net/config_misc.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
2013-04-08 15:27:47 -04:00
<module name="NewlineAtEndOfFile" />
</module>