added extra checks to the google checkstyle.

pull/419/merge
William Kim 2013-07-15 13:44:56 -04:00 committed by Justin Richer
parent aa4ae1ef52
commit 475a6fd4a2
1 changed files with 66 additions and 5 deletions

View File

@ -18,6 +18,7 @@
<!-- Checks that FIXME is not used in comments. TODO is preferred. --> <!-- Checks that FIXME is not used in comments. TODO is preferred. -->
<property name="format" value="((//.*)|(\*.*))FIXME"/> <property name="format" value="((//.*)|(\*.*))FIXME"/>
<property name="message" value='TODO is preferred to FIXME.'/> <property name="message" value='TODO is preferred to FIXME.'/>
<property name="severity" value="warning"/>
</module> </module>
<!-- All Java AST specific tests live under TreeWalker module. --> <!-- All Java AST specific tests live under TreeWalker module. -->
@ -39,6 +40,12 @@
<property name="tokens" value="STATIC_IMPORT, IMPORT"/> <property name="tokens" value="STATIC_IMPORT, IMPORT"/>
</module> </module>
<module name="AvoidStarImport">
<property name="severity" value="warning"/>
</module>
<module name="UnusedImports"/>
<!-- JAVADOC CHECKS --> <!-- JAVADOC CHECKS -->
<!-- Checks for Javadoc comments. --> <!-- Checks for Javadoc comments. -->
@ -128,7 +135,6 @@
<property name="severity" value="warning"/> <property name="severity" value="warning"/>
</module> </module>
<!-- LENGTH and CODING CHECKS --> <!-- LENGTH and CODING CHECKS -->
<module name="LineLength"> <module name="LineLength">
@ -136,7 +142,7 @@
<property name="max" <property name="max"
value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.max}" value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.max}"
default="250"/> default="250"/>
<property name="severity" value="error"/> <property name="severity" value="warning"/>
<!-- The default ignore pattern exempts the following elements: - import <!-- The default ignore pattern exempts the following elements: - import
statements - long URLs inside comments --> statements - long URLs inside comments -->
@ -181,7 +187,61 @@
<property name="severity" value="error"/> <property name="severity" value="error"/>
</module> </module>
<module name="AnnotationUseStyle">
<property name="severity" value="warning"/>
</module>
<module name="ArrayTypeStyle">
<property name="severity" value="warning"/>
</module>
<module name="AvoidNestedBlocks">
<property name="severity" value="error"/>
</module>
<module name="CovariantEquals">
<property name="severity" value="error"/>
</module>
<module name="DeclarationOrder">
<property name="severity" value="warning"/>
</module>
<module name="DefaultComesLast">
<property name="severity" value="warning"/>
</module>
<module name="EmptyStatement">
<property name="severity" value="warning"/>
</module>
<module name="MultipleStringLiterals">
<property name="allowedDuplicates" value="1"/>
<property name="severity" value="warning"/>
</module>
<module name="NeedBraces">
<property name="severity" value="error"/>
</module>
<module name="PackageDeclaration"/>
<!-- COMPLEXITY CHECKS -->
<module name="BooleanExpressionComplexity">
<property name="max" value="10"/>
<property name="severity" value="warning"/>
</module>
<module name="CyclomaticComplexity">
<property name="max" value="10"/>
<property name="severity" value="warning"/>
</module>
<module name="NPathComplexity">
<property name="max" value="200"/>
<property name="severity" value="warning"/>
</module>
<!-- MODIFIERS CHECKS --> <!-- MODIFIERS CHECKS -->
@ -205,12 +265,13 @@
LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS,
MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION,
SL, SL_ASSIGN, SR_ASSIGN, STAR, STAR_ASSIGN"/> SL, SL_ASSIGN, SR_ASSIGN, STAR, STAR_ASSIGN"/>
<property name="severity" value="error"/> <property name="severity" value="warning"/>
</module> </module>
<module name="WhitespaceAfter"> <module name="WhitespaceAfter">
<!-- Checks that commas, semicolons and typecasts are followed by whitespace. --> <!-- Checks that commas, semicolons and typecasts are followed by whitespace. -->
<property name="tokens" value="COMMA, SEMI, TYPECAST"/> <property name="tokens" value="COMMA, SEMI, TYPECAST"/>
<property name="severity" value="warning"/>
</module> </module>
<module name="NoWhitespaceAfter"> <module name="NoWhitespaceAfter">
@ -219,7 +280,7 @@
<property name="tokens" <property name="tokens"
value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/> value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
<property name="allowLineBreaks" value="true"/> <property name="allowLineBreaks" value="true"/>
<property name="severity" value="error"/> <property name="severity" value="warning"/>
</module> </module>
<module name="NoWhitespaceBefore"> <module name="NoWhitespaceBefore">
@ -227,7 +288,7 @@
Linebreaks are allowed. --> Linebreaks are allowed. -->
<property name="tokens" value="SEMI, DOT, POST_DEC, POST_INC"/> <property name="tokens" value="SEMI, DOT, POST_DEC, POST_INC"/>
<property name="allowLineBreaks" value="true"/> <property name="allowLineBreaks" value="true"/>
<property name="severity" value="error"/> <property name="severity" value="warning"/>
</module> </module>
<module name="ParenPad"> <module name="ParenPad">