HHH-9803 - Checkstyle fix ups

This commit is contained in:
Steve Ebersole 2015-05-16 14:04:43 -05:00
parent 4b3a655d49
commit 5f73d9277c
1 changed files with 112 additions and 127 deletions

View File

@ -25,12 +25,12 @@
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> <!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="Checker">
<!-- See http://checkstyle.sourceforge.net/checks.html for details of the various checks -->
<module name="TreeWalker"> <module name="TreeWalker">
<!-- <!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ High-priority warnings : fail the build...
General regex checks as part of the TreeWalker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--> -->
<module name="RegexpSinglelineJava"> <module name="RegexpSinglelineJava">
<property name="ignoreComments" value="true" /> <property name="ignoreComments" value="true" />
@ -38,202 +38,187 @@
<property name="message" value="Line has leading space characters; indentation should be performed with tabs only." /> <property name="message" value="Line has leading space characters; indentation should be performed with tabs only." />
</module> </module>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Annotation checks
See http://checkstyle.sourceforge.net/config_annotation.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="MissingDeprecated" /> <module name="MissingDeprecated" />
<module name="MissingOverride" /> <module name="MissingOverride" />
<module name="PackageAnnotation" /> <module name="PackageAnnotation" />
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Block checks
See http://checkstyle.sourceforge.net/config_blocks.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true" />
<property name="severity" value="warning" />
</module>
<module name="NeedBraces" /> <module name="NeedBraces" />
<module name="LeftCurly"> <module name="LeftCurly">
<property name="option" value="eol" /> <property name="option" value="eol" />
</module> </module>
<module name="RightCurly"> <module name="RightCurly">
<property name="option" value="alone" /> <property name="option" value="alone" />
</module> </module>
<module name="EqualsHashCode" />
<module name="StringLiteralEquality" />
<module name="NoFinalizer" />
<module name="OneStatementPerLine" />
<module name="AvoidStarImport" />
<module name="RedundantImport" />
<module name="UnusedImports" />
<module name="UpperEll" />
<!-- <!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Medium and low priority warnings : do not fail build
Design checks
See http://checkstyle.sourceforge.net/config_design.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--> -->
<module name="HideUtilityClassConstructor">
<!-- Some classes in o.h.metamodel on master do this --> <module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true" />
<property name="severity" value="warning" /> <property name="severity" value="warning" />
</module> </module>
<module name="MutableException" />
<module name="HideUtilityClassConstructor">
<property name="severity" value="warning" />
</module>
<!-- <module name="MutableException">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <property name="severity" value="warning" />
Coding checks </module>
See http://checkstyle.sourceforge.net/config_coding.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="EmptyStatement"> <module name="EmptyStatement">
<property name="severity" value="warning" /> <property name="severity" value="warning" />
</module> </module>
<module name="EqualsHashCode" />
<!--
<module name="FinalLocalVariable">
<property name="severity" value="warning" />
</module>
-->
<module name="MissingSwitchDefault"> <module name="MissingSwitchDefault">
<property name="severity" value="warning" /> <property name="severity" value="warning" />
</module> </module>
<module name="DefaultComesLast" />
<module name="DefaultComesLast">
<property name="severity" value="warning" />
</module>
<module name="ModifiedControlVariable"> <module name="ModifiedControlVariable">
<property name="severity" value="warning" /> <property name="severity" value="warning" />
</module> </module>
<module name="SimplifyBooleanExpression" />
<module name="SimplifyBooleanReturn" /> <module name="SimplifyBooleanExpression">
<module name="StringLiteralEquality" /> <property name="severity" value="warning" />
<module name="NoFinalizer" /> </module>
<module name="SimplifyBooleanReturn">
<property name="severity" value="warning" />
</module>
<module name="ExplicitInitialization"> <module name="ExplicitInitialization">
<property name="severity" value="warning" /> <property name="severity" value="warning" />
</module> </module>
<module name="FallThrough" />
<module name="OneStatementPerLine" />
<module name="FallThrough">
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Import checks
See http://checkstyle.sourceforge.net/config_imports.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="AvoidStarImport" />
<module name="RedundantImport" />
<module name="UnusedImports" />
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Misc checks
See http://checkstyle.sourceforge.net/config_misc.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="UpperEll" />
<module name="ArrayTypeStyle">
<!-- Some classes in o.h.metamodel on master do this -->
<property name="severity" value="warning" /> <property name="severity" value="warning" />
</module> </module>
<module name="ArrayTypeStyle">
<property name="severity" value="warning" />
</module>
<module name="TrailingComment"> <module name="TrailingComment">
<property name="severity" value="warning" /> <property name="severity" value="warning" />
</module> </module>
<module name="ModifierOrder">
<property name="severity" value="warning" />
</module>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modifier checks
See http://checkstyle.sourceforge.net/config_modifier.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="ModifierOrder"/>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Naming checks
See http://checkstyle.sourceforge.net/config_naming.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="AbstractClassName"> <module name="AbstractClassName">
<!-- we are just using this to make sure that classes matching the pattern (Abstract*) have the abstract modifier --> <!-- 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="format" value="^Abstract.*$" />
<property name="ignoreName" value="true" /> <property name="ignoreName" value="true" />
<property name="severity" value="warning" />
</module> </module>
<module name="ClassTypeParameterName"> <module name="ClassTypeParameterName">
<property name="format" value="^[A-Z][A-Z0-9]*$" /> <property name="format" value="^[A-Z][A-Z0-9]*$" />
<property name="severity" value="warning" />
</module> </module>
<module name="ConstantName"> <module name="ConstantName">
<property name="format" value="^[A-Z](_?[A-Z0-9]+)*$|log" /> <property name="format" value="^[A-Z](_?[A-Z0-9]+)*$|log" />
<!-- Some classes in o.h.metamodel on master violate this -->
<property name="severity" value="warning" /> <property name="severity" value="warning" />
</module> </module>
<module name="LocalFinalVariableName" />
<module name="LocalFinalVariableName">
<property name="severity" value="warning" />
</module>
<module name="LocalVariableName"> <module name="LocalVariableName">
<!-- Some classes in o.h.metamodel on master violate this -->
<property name="severity" value="warning" /> <property name="severity" value="warning" />
</module> </module>
<module name="MemberName" />
<!-- <module name="MemberName">
The org.hibernate.engine.spi.ManagedEntity method names (prefixed with '&&_') muck with this <property name="severity" value="warning" />
<module name="MethodName" /> </module>
-->
<module name="MethodTypeParameterName"> <module name="MethodTypeParameterName">
<property name="format" value="^[A-Z][A-Z0-9]*$" /> <property name="format" value="^[A-Z][A-Z0-9]*$" />
<property name="severity" value="warning" />
</module> </module>
<module name="PackageName" />
<module name="ParameterName" />
<module name="StaticVariableName" />
<module name="TypeName" />
<module name="PackageName">
<property name="severity" value="warning" />
</module>
<!-- <module name="ParameterName">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <property name="severity" value="warning" />
Whitespace checks </module>
<module name="StaticVariableName">
<property name="severity" value="warning" />
</module>
<module name="TypeName">
<property name="severity" value="warning" />
</module>
<module name="AbbreviationAsWordInName">
<property name="severity" value="warning" />
<property name="ignoreOverriddenMethod" value="true" />
</module>
<module name="MethodParamPad">
<property name="severity" value="warning" />
</module>
<module name="TypecastParenPad">
<property name="severity" value="warning" />
</module>
See http://checkstyle.sourceforge.net/config_whitespace.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="MethodParamPad" />
<module name="TypecastParenPad" />
<module name="ParenPad"> <module name="ParenPad">
<property name="tokens" value="CTOR_CALL, METHOD_CALL, SUPER_CTOR_CALL" /> <property name="tokens" value="CTOR_CALL, METHOD_CALL, SUPER_CTOR_CALL" />
<property name="option" value="space" /> <property name="option" value="space" />
<property name="severity" value="warning" />
</module> </module>
</module> </module>
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Javadoc checks
See http://checkstyle.sourceforge.net/config_javadoc.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<!--
<module name="JavadocPackage"> <module name="JavadocPackage">
<property name="allowLegacy" value="true" /> <property name="allowLegacy" value="true" />
<property name="severity" value="warning" />
</module> </module>
-->
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Misc checks
See http://checkstyle.sourceforge.net/config_misc.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<module name="NewlineAtEndOfFile" /> <module name="NewlineAtEndOfFile" />
<!--
Used to collect "todo" comments into a single location
-->
<module name="TreeWalker">
<module name="TodoComment">
<property name="format" value="[Tt][Oo][Dd][Oo]"/>
<property name="severity" value="info" />
</module>
</module>
</module> </module>