-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
203 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE module PUBLIC | ||
"-//Puppy Crawl//DTD Check Configuration 1.2//EN" | ||
"http://www.puppycrawl.com/dtds/configuration_1_2.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"> | ||
|
||
<property name="severity" value="error"/> | ||
|
||
<module name="SuppressionFilter"> | ||
<property name="file" value="checkstyle-suppressions.xml"/> | ||
</module> | ||
|
||
<module name="FileTabCharacter"> | ||
<property name="eachLine" value="true"/> | ||
</module> | ||
|
||
<module name="FileLength"> | ||
<property name="fileExtensions" value="java"/> | ||
</module> | ||
|
||
<module name="RegexpSingleline"> | ||
<property name="format" value="\s+$"/> | ||
<property name="message" value="Trailing whitespace detected"/> | ||
<property name="minimum" value="0"/> | ||
<property name="maximum" value="0"/> | ||
</module> | ||
|
||
<module name="TreeWalker"> | ||
<property name="cacheFile" value="${checkstyle.cache.file}"/> | ||
<property name="tabWidth" value="4"/> | ||
|
||
<module name="AvoidStarImport"/> | ||
<module name="EmptyForIteratorPad"/> | ||
<module name="GenericWhitespace"/> | ||
<module name="IllegalImport"/> | ||
<module name="IllegalInstantiation"/> | ||
<module name="ImportOrder"/> | ||
<module name="LeftCurly"/> | ||
<module name="LineLength"> | ||
<property name="max" value="160"/> | ||
</module> | ||
<module name="MethodLength"> | ||
<property name="max" value="200"/> | ||
<property name="countEmpty" value="false"/> | ||
</module> | ||
<module name="MethodParamPad"/> | ||
<module name="MissingDeprecated"/> | ||
<module name="MissingOverride"/> | ||
<module name="ModifiedControlVariable"/> | ||
<module name="NeedBraces"/> | ||
<module name="NestedIfDepth"> | ||
<property name="max" value="4"/> | ||
</module> | ||
<module name="NestedTryDepth"> | ||
<property name="max" value="3"/> | ||
</module> | ||
<module name="NoWhitespaceAfter"> | ||
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/> | ||
</module> | ||
<module name="NoWhitespaceBefore"> | ||
<property name="tokens" value="DOT"/> | ||
<property name="allowLineBreaks" value="true"/> | ||
</module> | ||
<module name="OneStatementPerLine"/> | ||
<module name="OperatorWrap"> | ||
<property name="tokens" value="ASSIGN, DIV_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, STAR_ASSIGN, MOD_ASSIGN, SR_ASSIGN, BSR_ASSIGN, SL_ASSIGN, BXOR_ASSIGN, BOR_ASSIGN, BAND_ASSIGN"/> | ||
<property name="option" value="eol"/> | ||
</module> | ||
<module name="OuterTypeFilename"/> | ||
<module name="OuterTypeNumber"/> | ||
<module name="PackageAnnotation"/> | ||
<module name="PackageDeclaration"/> | ||
<module name="PackageName"/> | ||
<module name="ParameterNumber"> | ||
<property name="id" value="paramNum"/> | ||
<property name="max" value="20"/> | ||
</module> | ||
<module name="ParenPad"/> | ||
<module name="RedundantImport"/> | ||
<module name="RightCurly"/> | ||
<module name="SimplifyBooleanExpression"/> | ||
<module name="StringLiteralEquality"/> | ||
<module name="SuppressWarnings"/> | ||
<module name="TypecastParenPad"/> | ||
<module name="TypeName"> | ||
<property name="format" value="^[A-Z][a-zA-Z0-9_]*$"/> | ||
</module> | ||
<module name="UnusedImports"/> | ||
<module name="WhitespaceAfter"/> | ||
<module name="WhitespaceAround"> | ||
<property name="allowEmptyConstructors" value="true"/> | ||
<property name="allowEmptyMethods" value="true"/> | ||
</module> | ||
</module> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE suppressions PUBLIC | ||
"-//Puppy Crawl//DTD Suppressions 1.0//EN" | ||
"http://www.puppycrawl.com/dtds/suppressions_1_0.dtd"> | ||
|
||
<suppressions> | ||
<suppress checks="ModifiedControlVariable" files="MessageFormatter\.java"/> | ||
<suppress checks="MethodLengthCheck|ModifiedControlVariable" files="SortScoresWithDocIds\.java"/> | ||
<suppress checks="ParameterNumberCheck" files="UserService\.java"/> | ||
<suppress checks=".*" files="target/generated-sources/|com/twitter/zipkin/gen"/> | ||
<suppress checks="FileLength" files="test/java/"/> | ||
</suppressions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters