-
Notifications
You must be signed in to change notification settings - Fork 22
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
21 changed files
with
2,266 additions
and
0 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,276 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | ||
|
||
<!-- | ||
This configuration file was written by the eclipse-cs plugin configuration editor | ||
--> | ||
<module name="Checker"> | ||
<property name="severity" value="error"/> | ||
<module name="TreeWalker"> | ||
<property name="tabWidth" value="4"/> | ||
<module name="AvoidStarImport"/> | ||
<module name="ConstantName"/> | ||
<module name="EmptyBlock"/> | ||
<module name="EmptyForIteratorPad"/> | ||
<module name="EqualsHashCode"/> | ||
<module name="OneStatementPerLine"/> | ||
<module name="IllegalImport"> | ||
<property name="regexp" value="true" /> | ||
<property name="illegalClasses" value="^junit\.framework\..+,^org\.junit\.Assert\..+,^org\.junit\.Assume\.assumeThat,^org\.junit\.rules\.ExpectedException,^org\.hamcrest\.CoreMatchers.*" /> | ||
</module> | ||
<module name="IllegalImport"> | ||
<property name="id" value="bannedGuavaPreconditionsInFavorOfApacheValidate" /> | ||
<property name="regexp" value="true" /> | ||
<property name="illegalClasses" value="^com\.google\.common\.base\.Preconditions.*" /> | ||
</module> | ||
<module name="IllegalImport"> | ||
<property name="id" value="bannedStringUtilsOtherThanApacheCommonsLang3" /> | ||
<property name="regexp" value="true" /> | ||
<property name="illegalClasses" value="^.+(?<!org\.apache\.commons\.lang3\.)StringUtils.*" /> | ||
</module> | ||
<module name="IllegalImport"> | ||
<property name="id" value="bannedJavaEmptyCollections" /> | ||
<property name="regexp" value="true" /> | ||
<property name="illegalClasses" value="^java\.util\.Collections\.empty(List|Map|Set)$" /> | ||
</module> | ||
<module name="IllegalInstantiation"/> | ||
<module name="InnerAssignment"/> | ||
<module name="LeftCurly"> | ||
<property name="option" value="nl"/> | ||
<property name="tokens" value="INTERFACE_DEF,CLASS_DEF,ANNOTATION_DEF,ENUM_DEF,CTOR_DEF,METHOD_DEF,ENUM_CONSTANT_DEF,LITERAL_WHILE,LITERAL_TRY,LITERAL_CATCH,LITERAL_FINALLY,LITERAL_SYNCHRONIZED,LITERAL_SWITCH,LITERAL_DO,LITERAL_IF,LITERAL_ELSE,LITERAL_FOR"/> | ||
</module> | ||
<module name="OuterTypeNumber"/> | ||
<module name="MethodCount"> | ||
<property name="maxTotal" value="35"/> | ||
</module> | ||
<module name="LocalFinalVariableName"/> | ||
<module name="LocalVariableName"/> | ||
<module name="MemberName"/> | ||
<module name="MethodLength"/> | ||
<module name="MethodName"/> | ||
<module name="ModifierOrder"/> | ||
<module name="NeedBraces"/> | ||
<module name="NoWhitespaceBefore"/> | ||
<module name="NoWhitespaceBeforeCaseDefaultColon"/> | ||
<module name="OperatorWrap"/> | ||
<module name="PackageName"/> | ||
<module name="ParameterName"/> | ||
<module name="LambdaParameterName"/> | ||
<module name="ParameterNumber"> | ||
<property name="id" value="paramNum"/> | ||
<property name="max" value="9"/> | ||
</module> | ||
<module name="ParenPad"/> | ||
<module name="TypecastParenPad"/> | ||
<module name="RedundantImport"/> | ||
<module name="RedundantModifier"/> | ||
<module name="RightCurly"> | ||
<property name="option" value="alone"/> | ||
<property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT, ANNOTATION_DEF, ENUM_DEF"/> | ||
</module> | ||
<module name="SimplifyBooleanExpression"/> | ||
<module name="SimplifyBooleanReturn"/> | ||
<module name="TypeName"/> | ||
<module name="TypeName"> | ||
<property name="format" value="^[A-Z][a-zA-Z0-9_]*(?<!Test)$" /> | ||
<property name="tokens" value="CLASS_DEF" /> | ||
<message key="name.invalidPattern" value="Class name ''{0}'' must not end with ''Test'' (checked pattern ''{1}'')." /> | ||
</module> | ||
<module name="TypeName"> | ||
<property name="format" value="^[A-Z][a-zA-Z0-9_]*(?<!Util)$" /> | ||
<property name="tokens" value="CLASS_DEF" /> | ||
<message key="name.invalidPattern" value="Class name ''{0}'' must not end with ''Util'' (checked pattern ''{1}'')." /> | ||
</module> | ||
<module name="UnusedImports"/> | ||
<module name="UpperEll"/> | ||
<module name="VisibilityModifier"/> | ||
<module name="WhitespaceAfter"/> | ||
<module name="WhitespaceAround"> | ||
<property name="ignoreEnhancedForColon" value="false"/> | ||
</module> | ||
<module name="GenericWhitespace"/> | ||
<module name="FinalClass"/> | ||
<module name="MissingSwitchDefault"/> | ||
<module name="MagicNumber"/> | ||
<module name="Indentation"> | ||
<property name="arrayInitIndent" value="8"/> | ||
</module> | ||
<module name="EqualsAvoidNull"/> | ||
<module name="ParameterAssignment"/> | ||
<module name="CyclomaticComplexity"> | ||
<property name="severity" value="ignore"/> | ||
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/> | ||
</module> | ||
<module name="NestedForDepth"> | ||
<property name="max" value="2"/> | ||
</module> | ||
<module name="NestedIfDepth"> | ||
<property name="max" value="3"/> | ||
</module> | ||
<module name="NestedTryDepth"/> | ||
<module name="ExplicitInitialization"/> | ||
<module name="AnnotationUseStyle"/> | ||
<module name="MissingDeprecated"/> | ||
<module name="MissingOverride"> | ||
<property name="javaFiveCompatibility" value="true"/> | ||
</module> | ||
<module name="PackageAnnotation"/> | ||
<module name="SuppressWarnings"/> | ||
<module name="OuterTypeFilename"/> | ||
<module name="AvoidNoArgumentSuperConstructorCall"/> | ||
<module name="HideUtilityClassConstructor"/> | ||
<!-- Make the @SuppressWarnings annotations available to Checkstyle --> | ||
<module name="SuppressWarningsHolder"/> | ||
<module name="NoEnumTrailingComma"/> | ||
<module name="com.github.sevntu.checkstyle.checks.naming.EnumValueNameCheck"> | ||
<property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/> | ||
</module> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.DiamondOperatorForVariableDefinitionCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.ReturnNullInsteadOfBooleanCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.ReturnBooleanFromTernaryCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.MultipleVariableDeclarationsExtendedCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.MultipleStringLiteralsExtendedCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.NameConventionForJunit4TestClassesCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.UnnecessaryParenthesesExtendedCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.UselessSingleCatchCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.UselessSuperCtorCallCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.annotation.RequiredParameterForAnnotationCheck"> | ||
<property name="annotationName" value="Deprecated"/> | ||
<property name="requiredParameters" value="since,forRemoval"/> | ||
</module> | ||
<module name="AnnotationLocation"/> | ||
<module name="AnnotationLocation"> | ||
<property name="tokens" value="METHOD_DEF"/> | ||
<property name="allowSamelineMultipleAnnotations" value="false"/> | ||
<property name="allowSamelineSingleParameterlessAnnotation" value="false"/> | ||
<property name="allowSamelineParameterizedAnnotation" value="false"/> | ||
</module> | ||
<module name="ClassTypeParameterName"/> | ||
<module name="MethodTypeParameterName"/> | ||
<module name="InterfaceTypeParameterName"/> | ||
<module name="EmptyCatchBlock"/> | ||
<module name="DeclarationOrder"/> | ||
<module name="EmptyStatement"/> | ||
<module name="IllegalThrows"> | ||
<property name="ignoredMethodNames" value="finalize, main"/> | ||
</module> | ||
<module name="StaticVariableName"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.AvoidHidingCauseExceptionCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.AvoidNotShortCircuitOperatorsForBooleanCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.EmptyPublicCtorInClassCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.ForbidInstantiationCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.ForbidReturnInFinallyBlockCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.ForbidThrowAnonymousExceptionsCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.IllegalCatchExtendedCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.MapIterationInForEachLoopCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.TernaryPerExpressionCountCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.NoNullForCollectionReturnCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.OverridableMethodInConstructorCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.EitherLogOrThrowCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.RedundantReturnCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.SimpleAccessorNameNotationCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.design.NestedSwitchCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.design.AvoidConditionInversionCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.design.NoMainMethodInAbstractClassCheck"/> | ||
<module name="com.github.sevntu.checkstyle.checks.coding.PreferMethodReferenceCheck"/> | ||
<module name="SeparatorWrap"> | ||
<property name="tokens" value="COMMA"/> | ||
</module> | ||
<module name="SingleSpaceSeparator"/> | ||
<module name="AvoidNestedBlocks"/> | ||
<module name="CovariantEquals"/> | ||
<module name="DefaultComesLast"/> | ||
<module name="ModifiedControlVariable"/> | ||
<module name="MultipleStringLiterals"/> | ||
<module name="MultipleVariableDeclarations"/> | ||
<module name="PackageDeclaration"/> | ||
<module name="StringLiteralEquality"/> | ||
<module name="AvoidDoubleBraceInitialization"/> | ||
<module name="SuperClone"/> | ||
<module name="UnnecessaryParentheses"/> | ||
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/> | ||
<module name="VariableDeclarationUsageDistance"> | ||
<property name="allowedDistance" value="5"/> | ||
</module> | ||
<module name="InnerTypeLast"/> | ||
<module name="NPathComplexity"/> | ||
<module name="AvoidEscapedUnicodeCharacters"/> | ||
<module name="EmptyLineSeparator"> | ||
<property name="allowNoEmptyLineBetweenFields" value="true"/> | ||
<property name="allowMultipleEmptyLines" value="false"/> | ||
</module> | ||
<module name="NoWhitespaceAfter"> | ||
<property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/> | ||
</module> | ||
<module name="MethodParamPad"/> | ||
<module name="ImportOrder"> | ||
<property name="groups" value="/^java\./,javax,com,org"/> | ||
<property name="ordered" value="true"/> | ||
<property name="separated" value="true"/> | ||
<property name="option" value="top"/> | ||
<property name="sortStaticImportsAlphabetically" value="true"/> | ||
</module> | ||
<module name="SuppressionCommentFilter"/> | ||
<module name="JavadocMethod" /> | ||
<module name="JavadocMissingWhitespaceAfterAsterisk" /> | ||
<module name="CommentsIndentation"/> | ||
<module name="TrailingComment" /> | ||
<module name="TodoComment"> | ||
<property name="format" value="(TODO)|(FIXME)"/> | ||
</module> | ||
<module name="RegexpSinglelineJava"> | ||
<property name="id" value="streamOf"/> | ||
<property name="maximum" value="0"/> | ||
<property name="format" value="Arrays\.stream" /> | ||
<property name="message" value="Use java.util.stream.Stream#of(T...)" /> | ||
<property name="ignoreComments" value="true" /> | ||
</module> | ||
<module name="RegexpSinglelineJava"> | ||
<property name="format" value="Collections\.(empty(List|Map|Set)\(\)|EMPTY_(LIST|MAP|SET))" /> | ||
<property name="message" value="Use List.of()/Map.of()/Set.of() for creating empty lists/maps/sets" /> | ||
<property name="ignoreComments" value="true" /> | ||
</module> | ||
</module> | ||
<module name="LineLength"> | ||
<property name="ignorePattern" value="^ *\* *[^ ]+$"/> | ||
<property name="max" value="120"/> | ||
</module> | ||
<module name="FileTabCharacter"/> | ||
<module name="FileLength"> | ||
<property name="fileExtensions" value="java"/> | ||
</module> | ||
<module name="NewlineAtEndOfFile"> | ||
<property name="lineSeparator" value="lf_cr_crlf"/> | ||
</module> | ||
<module name="RegexpSingleline"> | ||
<property name="format" value="\s+$"/> | ||
</module> | ||
<module name="RegexpSingleline"> | ||
<property name="format" value="^\s*\*\s*@author"/> | ||
</module> | ||
|
||
<!-- https://github.com/checkstyle/checkstyle/issues/3379#issuecomment-251223351 --> | ||
<module name="RegexpMultiline"> | ||
<property name="message" value="Blank line at start of block should be removed" /> | ||
<property name="format" value="(?<=\{\n\s{0,99}$)^$" /> | ||
<property name="fileExtensions" value="java" /> | ||
</module> | ||
<module name="RegexpMultiline"> | ||
<property name="message" value="Blank line at end of block should be removed" /> | ||
<property name="format" value="(?<!\{\n\s{0,99}$)^$(?=^\s{0,99}\})" /> | ||
<property name="fileExtensions" value="java" /> | ||
</module> | ||
|
||
<!-- Filter out Checkstyle warnings that have been suppressed with the @SuppressWarnings annotation --> | ||
<module name="SuppressWarningsFilter"/> | ||
<module name="SuppressWithPlainTextCommentFilter"> | ||
<property name="offCommentFormat" value="CHECKSTYLE\:OFF.*"/> | ||
<property name="onCommentFormat" value="CHECKSTYLE\:ON.*"/> | ||
</module> | ||
<module name="SuppressionFilter"> | ||
<property name="file" value="${config_loc}/suppressions.xml"/> | ||
<property name="optional" value="false"/> | ||
</module> | ||
|
||
<module name="UniqueProperties"/> | ||
</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,6 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> | ||
<suppressions> | ||
<suppress checks="MagicNumber" files=".*Tests.java" /> | ||
<suppress checks="SingleSpaceSeparator" files=".*Tests.java" /> | ||
</suppressions> |
Oops, something went wrong.