blob: ba500ba8986c592e02f997e6877cf7c8e2cacdac [file] [log] [blame]
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the sun coding conventions from:
- 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).
Most Checks are configurable, be sure to consult the documentation.
To completely disable a check, just comment it out or delete it from the file.
Finally, it is worth reading the documentation.
-->
<module name="Checker">
<!-- Checks that each Java package has a Javadoc file used for commenting. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
<module name="JavadocPackage">
<property name="allowLegacy" value="true" />
<property name="severity" value="info" />
</module>
<!-- Checks that property files contain the same keys. -->
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
<module name="Translation" />
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="FileLength">
<property name="max" value="2000" />
<property name="severity" value="warning" />
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true" />
<property name="fileExtensions"
value="java,jsp,jsf,css,html,htm,c,h,properties,txt,sh,sql" />
<property name="severity" value="error" />
</module>
<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="format" value="\s+$" />
<property name="message" value="Line has trailing spaces." />
<property name="severity" value="error" />
</module>
<module name="TreeWalker">
<property name="tabWidth" value="4" />
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod">
<property name="validateThrows" value="true" />
<property name="severity" value="warning" />
<property name="accessModifiers" value="public, protected" />
</module>
<module name="JavadocStyle">
<property name="checkFirstSentence" value="false" />
<property name="severity" value="warning" />
</module>
<module name="JavadocType">
<property name="severity" value="warning" />
</module>
<module name="JavadocVariable">
<property name="scope" value="protected" />
<property name="severity" value="warning" />
</module>
<!-- Checks for Naming Conventions. -->
<module name="ClassTypeParameterName" />
<module name="PackageName" />
<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<module name="IllegalImport" /> <!-- defaults to sun.* packages -->
<module name="RedundantImport" />
<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<module name="RedundantModifier">
<property name="severity" value="info" />
</module>
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<module name="ArrayTrailingComma">
<property name="severity" value="warning"/>
</module>
<module name="ExplicitInitialization">
<property name="severity" value="info" />
</module>
<module name="IllegalInstantiation" />
<module name="MagicNumber">
<property name="severity" value="info" />
</module>
<module name="MissingSwitchDefault">
<property name="severity" value="warning" />
</module>
<module name="MultipleStringLiterals">
<property name="allowedDuplicates" value="1" />
<property name="ignoreStringsRegexp" value="^((&quot;(([^=]+=)|([^\)]*\))|([\s\)\('&quot;,.\+\-\:]+))&quot;))$" />
<property name="severity" value="warning" />
</module>
<module name="PackageDeclaration" />
<!-- See http://checkstyle.sourceforge.net/config_metrics.html -->
<module name="ClassDataAbstractionCoupling">
<property name="max" value="16" />
<property name="severity" value="warning" />
</module>
<module name="CyclomaticComplexity">
<property name="max" value="50" />
<property name="severity" value="warning" />
</module>
<module name="JavaNCSS">
<property name="methodMaximum" value="100" />
<property name="classMaximum" value="20000" />
<property name="severity" value="warning" />
</module>
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<module name="Indentation">
<property name="basicOffset" value="4" />
<property name="braceAdjustment" value="0" />
<property name="caseIndent" value="4" />
<property name="severity" value="warning" />
</module>
<module name="TodoComment">
<property name="format" value="TODO|FIXME|[VW]OODOO|WTF" />
<property name="severity" value="warning" />
</module>
<module name="TrailingComment">
<property name="severity" value="warning" />
</module>
</module>
</module>