173 lines
6.9 KiB
XML
173 lines
6.9 KiB
XML
|
|
<?xml version="1.0"?>
|
||
|
|
<!--
|
||
|
|
|
||
|
|
Copyright (c) 2004-2012, Willem Cazander
|
||
|
|
All rights reserved.
|
||
|
|
|
||
|
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||
|
|
that the following conditions are met:
|
||
|
|
|
||
|
|
* Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||
|
|
following disclaimer.
|
||
|
|
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||
|
|
the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||
|
|
|
||
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||
|
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||
|
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||
|
|
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||
|
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||
|
|
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||
|
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||
|
|
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
|
|
||
|
|
-->
|
||
|
|
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
|
||
|
|
<!--
|
||
|
|
Checkstyle config sun coding conventions:
|
||
|
|
- the Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/index.html
|
||
|
|
- the Sun Code Conventions at http://java.sun.com/docs/codeconv/
|
||
|
|
- the Javadoc guidelines at http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
|
||
|
|
- the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
|
||
|
|
- some best practices
|
||
|
|
|
||
|
|
Checkstyle is very configurable. Be sure to read the documentation at
|
||
|
|
http://checkstyle.sf.net (or in your downloaded distribution).
|
||
|
|
-->
|
||
|
|
<module name="Checker">
|
||
|
|
|
||
|
|
<!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->
|
||
|
|
<!-- Checks is package-info.java is present. -->
|
||
|
|
<module name="JavadocPackage"/>
|
||
|
|
|
||
|
|
<!-- Checks whether files end with a new line. -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
|
||
|
|
<module name="NewlineAtEndOfFile"/>
|
||
|
|
|
||
|
|
<!-- Checks that property files contain the same keys. -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
|
||
|
|
<module name="Translation"/>
|
||
|
|
|
||
|
|
<module name="FileLength">
|
||
|
|
<property name="max" value="1500"/>
|
||
|
|
</module>
|
||
|
|
|
||
|
|
<module name="TreeWalker">
|
||
|
|
<!-- cache file -->
|
||
|
|
<property name="cacheFile" value="${checkstyle.cache.file}"/>
|
||
|
|
|
||
|
|
<!-- Check line length -->
|
||
|
|
<module name="LineLength">
|
||
|
|
<property name="max" value="200"/>
|
||
|
|
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
|
||
|
|
</module>
|
||
|
|
|
||
|
|
<!--check for imports-->
|
||
|
|
<module name="AvoidStarImport"/>
|
||
|
|
<module name="IllegalImport"/>
|
||
|
|
<module name="RedundantImport"/>
|
||
|
|
<module name="UnusedImports"/>
|
||
|
|
|
||
|
|
<!--check for equals and hashcode-->
|
||
|
|
<module name="EqualsHashCode"/>
|
||
|
|
|
||
|
|
<!--check for final class-->
|
||
|
|
<module name="FinalClass"/>
|
||
|
|
|
||
|
|
<!-- Checks for Javadoc comments. -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
|
||
|
|
<module name="JavadocType">
|
||
|
|
<property name="scope" value="public"/>
|
||
|
|
<property name="authorFormat" value="\S"/>
|
||
|
|
</module>
|
||
|
|
<module name="JavadocMethod"/>
|
||
|
|
<module name="JavadocVariable">
|
||
|
|
<property name="scope" value="public"/>
|
||
|
|
</module>
|
||
|
|
<module name="JavadocStyle">
|
||
|
|
<property name="scope" value="public"/>
|
||
|
|
</module>
|
||
|
|
|
||
|
|
<!-- Checks for Naming Conventions. -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_naming.html -->
|
||
|
|
<module name="ConstantName"/>
|
||
|
|
<module name="LocalFinalVariableName"/>
|
||
|
|
<module name="LocalVariableName"/>
|
||
|
|
<module name="MemberName"/>
|
||
|
|
<module name="MethodName"/>
|
||
|
|
<module name="PackageName"/>
|
||
|
|
<module name="ParameterName"/>
|
||
|
|
<module name="StaticVariableName"/>
|
||
|
|
<module name="TypeName"/>
|
||
|
|
|
||
|
|
<!-- Checks for Size Violations. -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_sizes.html -->
|
||
|
|
<module name="MethodLength"/>
|
||
|
|
<module name="ParameterNumber"/>
|
||
|
|
|
||
|
|
<!-- Checks for whitespace -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
|
||
|
|
<module name="EmptyForIteratorPad"/>
|
||
|
|
|
||
|
|
<!--
|
||
|
|
<module name="MethodParamPad"/>
|
||
|
|
<module name="NoWhitespaceAfter"/>
|
||
|
|
<module name="NoWhitespaceBefore"/>
|
||
|
|
<module name="TabCharacter"/>
|
||
|
|
<module name="WhitespaceAfter"/>
|
||
|
|
<module name="WhitespaceAround"/>
|
||
|
|
<module name="ParenPad"/>
|
||
|
|
-->
|
||
|
|
<module name="OperatorWrap"/>
|
||
|
|
<module name="TypecastParenPad"/>
|
||
|
|
|
||
|
|
|
||
|
|
<!-- Modifier Checks -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
|
||
|
|
<module name="ModifierOrder"/>
|
||
|
|
<module name="RedundantModifier"/>
|
||
|
|
|
||
|
|
<!-- Checks for blocks. You know, those {}'s -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_blocks.html -->
|
||
|
|
<module name="AvoidNestedBlocks"/>
|
||
|
|
<module name="EmptyBlock"/>
|
||
|
|
<module name="LeftCurly"/>
|
||
|
|
<module name="NeedBraces"/>
|
||
|
|
<module name="RightCurly"/>
|
||
|
|
|
||
|
|
<!-- Checks for common coding problems -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_coding.html -->
|
||
|
|
<module name="AvoidInlineConditionals"/>
|
||
|
|
<module name="DoubleCheckedLocking"/>
|
||
|
|
<module name="EmptyStatement"/>
|
||
|
|
<module name="HiddenField"/>
|
||
|
|
<module name="IllegalInstantiation"/>
|
||
|
|
<module name="InnerAssignment"/>
|
||
|
|
<!--
|
||
|
|
<module name="MagicNumber"/>
|
||
|
|
-->
|
||
|
|
<module name="MissingSwitchDefault"/>
|
||
|
|
<module name="RedundantThrows"/>
|
||
|
|
<module name="SimplifyBooleanExpression"/>
|
||
|
|
<module name="SimplifyBooleanReturn"/>
|
||
|
|
<module name="NoFinalizer"/>
|
||
|
|
<module name="SuperClone"/>
|
||
|
|
<module name="SuperFinalize"/>
|
||
|
|
<module name="IllegalCatch"/>
|
||
|
|
<module name="IllegalThrows"/>
|
||
|
|
|
||
|
|
<!-- Checks for class design -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_design.html -->
|
||
|
|
<module name="HideUtilityClassConstructor"/>
|
||
|
|
<module name="InterfaceIsType"/>
|
||
|
|
<module name="VisibilityModifier"/>
|
||
|
|
|
||
|
|
<!-- Miscellaneous other checks. -->
|
||
|
|
<!-- See http://checkstyle.sf.net/config_misc.html -->
|
||
|
|
<module name="ArrayTypeStyle"/>
|
||
|
|
<module name="TodoComment"/>
|
||
|
|
<module name="UpperEll"/>
|
||
|
|
</module>
|
||
|
|
</module>
|