mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-24 03:25:12 +01:00
Merge pull request #2994 from Multiverse/dtm/checkstyle_upgrade
Upgrade Checkstyle & Rules.
This commit is contained in:
commit
5f9a002a07
18
.github/workflows/generic.checkstyle.yml
vendored
Normal file
18
.github/workflows/generic.checkstyle.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
name: 'Generic: Checkstyle'
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checkstyle:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: dbelyaev/action-checkstyle@v0.8.4
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
checkstyle_version: 10.12.2
|
||||||
|
checkstyle_config: ./config/mv_checks.xml
|
9
.github/workflows/pr.checkstyle.yml
vendored
Normal file
9
.github/workflows/pr.checkstyle.yml
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
name: 'PR: Checkstyle'
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
checkstyle:
|
||||||
|
uses: ./.github/workflows/generic.checkstyle.yml
|
@ -161,7 +161,7 @@ processResources {
|
|||||||
|
|
||||||
|
|
||||||
checkstyle {
|
checkstyle {
|
||||||
toolVersion = '6.1.1'
|
toolVersion = '10.12.2'
|
||||||
configFile file('config/mv_checks.xml')
|
configFile file('config/mv_checks.xml')
|
||||||
ignoreFailures = true
|
ignoreFailures = true
|
||||||
}
|
}
|
||||||
|
@ -6,23 +6,43 @@
|
|||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
|
||||||
|
|
||||||
<!DOCTYPE module PUBLIC
|
<!DOCTYPE module PUBLIC
|
||||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||||
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||||
<!-- Future reference: valid severity values are 'ignore', 'info', 'warning', 'error' -->
|
<!-- Future reference: valid severity values are 'ignore', 'info', 'warning', 'error' -->
|
||||||
<module name="Checker">
|
<module name="Checker">
|
||||||
<module name="JavadocPackage">
|
|
||||||
<property name="allowLegacy" value="true"/>
|
<!-- Javadoc Comments -->
|
||||||
</module>
|
<module name="JavadocPackage"/><!-- require package-info.java file -->
|
||||||
|
|
||||||
|
<!-- Miscellaneous -->
|
||||||
<module name="NewlineAtEndOfFile" />
|
<module name="NewlineAtEndOfFile" />
|
||||||
|
<module name="OrderedProperties"/>
|
||||||
<module name="Translation"/>
|
<module name="Translation"/>
|
||||||
<module name="FileLength"/>
|
<module name="UniqueProperties"/>
|
||||||
<module name="FileTabCharacter">
|
|
||||||
<property name="eachLine" value="true"/>
|
<!-- Regexp -->
|
||||||
</module>
|
|
||||||
<module name="RegexpSingleline">
|
<module name="RegexpSingleline">
|
||||||
<property name="message" value="Line has trailing spaces."/>
|
<property name="message" value="Line has trailing spaces."/>
|
||||||
<property name="format" value="\s+$"/>
|
<property name="format" value="\s+$"/>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
<!-- Size Violations -->
|
||||||
|
<module name="FileLength">
|
||||||
|
<property name="max" value="2000"/>
|
||||||
|
</module>
|
||||||
|
<module name="LineLength">
|
||||||
|
<property name="fileExtensions" value="java"/>
|
||||||
|
<property name="max" value="160"/>
|
||||||
|
<property name="severity" value="warning"/>
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<!-- Whitespace -->
|
||||||
|
<module name="FileTabCharacter">
|
||||||
|
<property name="eachLine" value="true"/>
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<module name="TreeWalker">
|
||||||
|
<!-- Make suppression possible -->
|
||||||
<module name="SuppressWithNearbyCommentFilter">
|
<module name="SuppressWithNearbyCommentFilter">
|
||||||
<property name="commentFormat" value="SUPPRESS CHECKSTYLE: (\w+)"/>
|
<property name="commentFormat" value="SUPPRESS CHECKSTYLE: (\w+)"/>
|
||||||
<property name="checkFormat" value="$1"/>
|
<property name="checkFormat" value="$1"/>
|
||||||
@ -36,106 +56,322 @@
|
|||||||
<property name="offCommentFormat" value="BEGIN CHECKSTYLE-SUPPRESSION\: ALL"/>
|
<property name="offCommentFormat" value="BEGIN CHECKSTYLE-SUPPRESSION\: ALL"/>
|
||||||
<property name="onCommentFormat" value="END CHECKSTYLE-SUPPRESSION\: ALL"/>
|
<property name="onCommentFormat" value="END CHECKSTYLE-SUPPRESSION\: ALL"/>
|
||||||
</module>
|
</module>
|
||||||
<module name="TreeWalker">
|
|
||||||
<!-- Make suppression possible -->
|
|
||||||
<module name="FileContentsHolder"/>
|
|
||||||
<!-- Actual checks -->
|
<!-- Actual checks -->
|
||||||
<module name="LineLength">
|
|
||||||
<property name="max" value="160"/>
|
<!-- Annotations -->
|
||||||
|
<module name="AnnotationLocation"/>
|
||||||
|
<module name="AnnotationUseStyle"/>
|
||||||
|
<module name="MissingDeprecated"/>
|
||||||
|
<module name="MissingOverride"/>
|
||||||
|
|
||||||
|
<!-- Block Checks -->
|
||||||
|
<module name="AvoidNestedBlocks"/>
|
||||||
|
<module name="EmptyBlock"/>
|
||||||
|
<module name="EmptyCatchBlock">
|
||||||
|
<property name="exceptionVariableName" value="ignore"/>
|
||||||
|
</module>
|
||||||
|
<module name="LeftCurly">
|
||||||
|
<property name="ignoreEnums" value="false"/>
|
||||||
|
</module>
|
||||||
|
<module name="NeedBraces">
|
||||||
|
<property name="tokens" value="LITERAL_IF"/>
|
||||||
|
<property name="allowSingleLineStatement" value="true"/>
|
||||||
|
</module>
|
||||||
|
<module name="NeedBraces">
|
||||||
|
<property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FOR,LITERAL_WHILE"/>
|
||||||
|
</module>
|
||||||
|
<module name="RightCurly"/>
|
||||||
|
|
||||||
|
<!-- Class Design -->
|
||||||
|
<module name="DesignForExtension">
|
||||||
|
<property name="severity" value="info"/>
|
||||||
|
</module>
|
||||||
|
<module name="FinalClass"/>
|
||||||
|
<module name="HideUtilityClassConstructor"/>
|
||||||
|
<module name="InnerTypeLast"/>
|
||||||
|
<module name="InterfaceIsType"/>
|
||||||
|
<module name="MutableException"/>
|
||||||
|
<module name="OneTopLevelClass"/>
|
||||||
|
<module name="ThrowsCount">
|
||||||
|
<property name="max" value="0"/>
|
||||||
|
</module>
|
||||||
|
<module name="VisibilityModifier">
|
||||||
|
<property name="protectedAllowed" value="true"/>
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<!-- Coding -->
|
||||||
|
<module name="ArrayTrailingComma"/>
|
||||||
|
<module name="AvoidDoubleBraceInitialization"/>
|
||||||
|
<module name="AvoidNoArgumentSuperConstructorCall"/>
|
||||||
|
<module name="CovariantEquals"/>
|
||||||
|
<module name="DeclarationOrder"/>
|
||||||
|
<module name="DefaultComesLast"/>
|
||||||
|
<module name="EmptyStatement"/>
|
||||||
|
<module name="EqualsAvoidNull"/>
|
||||||
|
<module name="EqualsHashCode"/>
|
||||||
|
<module name="FallThrough">
|
||||||
|
<property name="checkLastCaseGroup" value="true"/>
|
||||||
|
</module>
|
||||||
|
<module name="HiddenField">
|
||||||
|
<property name="ignoreConstructorParameter" value="true"/>
|
||||||
|
<property name="ignoreSetter" value="true"/>
|
||||||
|
<property name="setterCanReturnItsClass" value="true"/>
|
||||||
|
<property name="ignoreAbstractMethods" value="true"/>
|
||||||
|
</module>
|
||||||
|
<module name="IllegalCatch"/>
|
||||||
|
<module name="IllegalThrows"/>
|
||||||
|
<module name="IllegalToken"/>
|
||||||
|
<module name="IllegalType"/>
|
||||||
|
<module name="InnerAssignment"/>
|
||||||
|
<module name="MagicNumber">
|
||||||
|
<property name="ignoreHashCodeMethod" value="true"/>
|
||||||
|
<property name="ignoreAnnotationElementDefaults" value="true"/>
|
||||||
|
</module>
|
||||||
|
<module name="MissingSwitchDefault"/>
|
||||||
|
<module name="ModifiedControlVariable"/>
|
||||||
|
<module name="MultipleStringLiterals"/>
|
||||||
|
<module name="MultipleVariableDeclarations"/>
|
||||||
|
<module name="NestedForDepth">
|
||||||
<property name="severity" value="warning"/>
|
<property name="severity" value="warning"/>
|
||||||
</module>
|
</module>
|
||||||
<module name="JavadocMethod">
|
<module name="NestedIfDepth"/>
|
||||||
<property name="scope" value="package"/><!-- We don't need javadoc for private methods -->
|
<module name="NestedTryDepth"/>
|
||||||
<property name="tokens" value="METHOD_DEF"/><!-- We don't need javadoc for constructors -->
|
<module name="NoClone"/>
|
||||||
|
<module name="NoFinalizer"/>
|
||||||
|
<module name="OneStatementPerLine"/>
|
||||||
|
<module name="PackageDeclaration"/>
|
||||||
|
<module name="ParameterAssignment"/>
|
||||||
|
<module name="RequireThis"/>
|
||||||
|
<module name="ReturnCount"/>
|
||||||
|
<module name="SimplifyBooleanExpression"/>
|
||||||
|
<module name="SimplifyBooleanReturn"/>
|
||||||
|
<module name="StringLiteralEquality"/>
|
||||||
|
<module name="SuperClone"/>
|
||||||
|
<module name="SuperFinalize"/>
|
||||||
|
<module name="UnnecessaryParentheses"/>
|
||||||
|
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
|
||||||
|
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
|
||||||
|
<module name="UnnecessarySemicolonInEnumeration"/>
|
||||||
|
<module name="UnnecessarySemicolonInTryWithResources"/>
|
||||||
|
<module name="UnusedLocalVariable"/>
|
||||||
|
<module name="VariableDeclarationUsageDistance">
|
||||||
|
<property name="allowedDistance" value="3"/>
|
||||||
|
<property name="validateBetweenScopes" value="false"/>
|
||||||
</module>
|
</module>
|
||||||
|
<module name="VariableDeclarationUsageDistance">
|
||||||
|
<property name="allowedDistance" value="5"/>
|
||||||
|
<property name="validateBetweenScopes" value="true"/>
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<!-- Imports -->
|
||||||
|
<module name="AvoidStarImport"/>
|
||||||
|
<module name="IllegalImport">
|
||||||
|
<property name="illegalPkgs" value="sun"/>
|
||||||
|
</module>
|
||||||
|
<module name="ImportOrder"/>
|
||||||
|
<module name="RedundantImport"/>
|
||||||
|
<module name="UnusedImports"/>
|
||||||
|
|
||||||
|
<!-- Javadoc Comments -->
|
||||||
|
<module name="AtclauseOrder"/>
|
||||||
|
<module name="InvalidJavadocPosition"/>
|
||||||
|
<module name="JavadocBlockTagLocation"/>
|
||||||
|
<module name="JavadocContentLocationCheck"/>
|
||||||
|
<module name="JavadocMethod">
|
||||||
|
<property name="accessModifiers" value="public, protected, package"/>
|
||||||
|
<property name="tokens" value="METHOD_DEF"/>
|
||||||
|
</module>
|
||||||
|
<module name="JavadocMethod">
|
||||||
|
<property name="accessModifiers" value="public"/>
|
||||||
|
</module>
|
||||||
|
<module name="JavadocMissingLeadingAsterisk"/>
|
||||||
|
<module name="JavadocMissingWhitespaceAfterAsterisk"/>
|
||||||
|
<module name="JavadocParagraph">
|
||||||
|
<property name="allowNewlineParagraph" value="true"/>
|
||||||
|
</module>
|
||||||
|
<module name="JavadocStyle">
|
||||||
|
<property name="scope" value="package"/>
|
||||||
|
</module>
|
||||||
|
<module name="JavadocTagContinuationIndentation"/>
|
||||||
<module name="JavadocType"/>
|
<module name="JavadocType"/>
|
||||||
<module name="JavadocVariable">
|
<module name="JavadocVariable">
|
||||||
<property name="scope" value="package"/><!-- We don't need javadoc for private variables -->
|
<property name="scope" value="package"/>
|
||||||
</module>
|
</module>
|
||||||
<module name="JavadocStyle"/>
|
<module name="MissingJavadocMethod">
|
||||||
|
<property name="scope" value="public"/>
|
||||||
|
<property name="allowMissingPropertyJavadoc" value="true"/>
|
||||||
|
</module>
|
||||||
|
<module name="MissingJavadocMethod">
|
||||||
|
<property name="scope" value="protected"/>
|
||||||
|
<property name="excludeScope" value="public"/>
|
||||||
|
<property name="allowMissingPropertyJavadoc" value="true"/>
|
||||||
|
<property name="minLineCount" value="2"/>
|
||||||
|
</module>
|
||||||
|
<module name="MissingJavadocType"/>
|
||||||
|
<module name="NonEmptyAtclauseDescription"/>
|
||||||
|
<module name="RequireEmptyLineBeforeBlockTagGroup"/>
|
||||||
|
<module name="SingleLineJavadoc"/>
|
||||||
|
<module name="SummaryJavadoc"/>
|
||||||
<module name="WriteTag">
|
<module name="WriteTag">
|
||||||
<property name="tag" value="@author"/>
|
<property name="tag" value="@author"/>
|
||||||
<property name="tagFormat" value="\S"/>
|
<property name="tagFormat" value="\S"/>
|
||||||
<property name="severity" value="ignore"/>
|
<property name="severity" value="ignore"/>
|
||||||
<property name="tagSeverity" value="warning"/>
|
<property name="tagSeverity" value="warning"/>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
<!-- Metrics -->
|
||||||
|
<module name="BooleanExpressionComplexity"/>
|
||||||
|
<module name="ClassDataAbstractionCoupling">
|
||||||
|
<property name="max" value="7"/>
|
||||||
|
<property name="excludedClasses" value="ArrayIndexOutOfBoundsException, ArrayList, Boolean, Byte, Character, Class, Collection, Deprecated, Deque, Double, DoubleStream, EnumSet, Exception, Float, FunctionalInterface, HashMap, HashSet, IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, IntStream, Integer, LinkedHashMap, LinkedHashSet, LinkedList, List, Long, LongStream, Map, NullPointerException, Object, Optional, OptionalDouble, OptionalInt, OptionalLong, Override, Queue, RuntimeException, SafeVarargs, SecurityException, Set, Short, SortedMap, SortedSet, Stream, String, StringBuffer, StringBuilder, SuppressWarnings, Throwable, TreeMap, TreeSet, UnsupportedOperationException, Void, boolean, byte, char, double, float, int, long, short, var, void"/>
|
||||||
|
</module>
|
||||||
|
<module name="ClassFanOutComplexity">
|
||||||
|
<property name="max" value="20"/>
|
||||||
|
<property name="excludedClasses" value="ArrayIndexOutOfBoundsException, ArrayList, Boolean, Byte, Character, Class, Collection, Deprecated, Deque, Double, DoubleStream, EnumSet, Exception, Float, FunctionalInterface, HashMap, HashSet, IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, IntStream, Integer, LinkedHashMap, LinkedHashSet, LinkedList, List, Long, LongStream, Map, NullPointerException, Object, Optional, OptionalDouble, OptionalInt, OptionalLong, Override, Queue, RuntimeException, SafeVarargs, SecurityException, Set, Short, SortedMap, SortedSet, Stream, String, StringBuffer, StringBuilder, SuppressWarnings, Throwable, TreeMap, TreeSet, UnsupportedOperationException, Void, boolean, byte, char, double, float, int, long, short, var, void"/>
|
||||||
|
</module>
|
||||||
|
<module name="CyclomaticComplexity">
|
||||||
|
<property name="max" value="7"/>
|
||||||
|
<property name="severity" value="warning"/>
|
||||||
|
</module>
|
||||||
|
<module name="JavaNCSS">
|
||||||
|
<property name="methodMaximum" value="50"/>
|
||||||
|
<property name="classMaximum" value="1500"/>
|
||||||
|
<property name="fileMaximum" value="2000"/>
|
||||||
|
<property name="recordMaximum" value="150"/>
|
||||||
|
</module>
|
||||||
|
<module name="NPathComplexity">
|
||||||
|
<property name="max" value="200"/>
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<!-- Miscellaneous -->
|
||||||
|
<module name="ArrayTypeStyle"/>
|
||||||
|
<module name="AvoidEscapedUnicodeCharacters">
|
||||||
|
<property name="allowNonPrintableEscapes" value="true"/>
|
||||||
|
</module>
|
||||||
|
<module name="CommentsIndentation"/>
|
||||||
|
<module name="Indentation">
|
||||||
|
<property name="basicOffset" value="4"/>
|
||||||
|
<property name="braceAdjustment" value="0"/>
|
||||||
|
<property name="caseIndent" value="4"/>
|
||||||
|
<property name="throwsIndent" value="4"/>
|
||||||
|
<property name="arrayInitIndent" value="4"/>
|
||||||
|
<property name="lineWrappingIndentation" value="4"/>
|
||||||
|
<property name="forceStrictCondition" value="true"/>
|
||||||
|
</module>
|
||||||
|
<module name="NoCodeInFile"/>
|
||||||
|
<module name="OuterTypeFilename"/>
|
||||||
|
<module name="TodoComment">
|
||||||
|
<property name="format" value="TODO"/>
|
||||||
|
<property name="severity" value="warning"/>
|
||||||
|
</module>
|
||||||
|
<module name="TrailingComment"/>
|
||||||
|
<module name="UncommentedMain"/>
|
||||||
|
<module name="UpperEll"/>
|
||||||
|
|
||||||
|
<!-- Modifiers -->
|
||||||
|
<module name="ModifierOrder"/>
|
||||||
|
<module name="RedundantModifier"/>
|
||||||
|
|
||||||
|
<!-- Naming Conventions -->
|
||||||
|
<module name="AbbreviationAsWordInName">
|
||||||
|
<property name="ignoreFinal" value="false"/>
|
||||||
|
<property name="allowedAbbreviations" value="MV"/>
|
||||||
|
</module>
|
||||||
|
<module name="AbstractClassName"/>
|
||||||
|
<module name="CatchParameterName"/>
|
||||||
|
<module name="ClassTypeParameterName">
|
||||||
|
<property name="format" value="^[A-Z]{1,3}$"/>
|
||||||
|
</module>
|
||||||
<module name="ConstantName"/>
|
<module name="ConstantName"/>
|
||||||
|
<module name="IllegalIdentifierName"/>
|
||||||
|
<module name="InterfaceTypeParameterName">
|
||||||
|
<property name="format" value="^[A-Z]{1,3}$"/>
|
||||||
|
</module>
|
||||||
|
<module name="LambdaParameterName"/>
|
||||||
|
<module name="LocalFinalVariableName"/>
|
||||||
<module name="LocalVariableName"/>
|
<module name="LocalVariableName"/>
|
||||||
<module name="MemberName"/>
|
<module name="MemberName"/>
|
||||||
<module name="MethodName"/>
|
<module name="MethodName"/>
|
||||||
|
<module name="MethodTypeParameterName">
|
||||||
|
<property name="format" value="^[A-Z]{1,3}$"/>
|
||||||
|
</module>
|
||||||
<module name="PackageName"/>
|
<module name="PackageName"/>
|
||||||
<module name="ParameterName"/>
|
<module name="ParameterName"/>
|
||||||
|
<module name="PatternVariableName"/>
|
||||||
|
<module name="RecordComponentName"/>
|
||||||
|
<module name="RecordTypeParameterName">
|
||||||
|
<property name="format" value="^[A-Z]{1,3}$"/>
|
||||||
|
</module>
|
||||||
<module name="StaticVariableName"/>
|
<module name="StaticVariableName"/>
|
||||||
<module name="TypeName"/>
|
<module name="TypeName"/>
|
||||||
<module name="AvoidStarImport">
|
|
||||||
<property name="severity" value="warning"/>
|
<!-- Size Violations -->
|
||||||
<property name="excludes" value="com.onarandombox.MultiverseCore.utils,com.onarandombox.MultiverseCore.configuration,com.onarandombox.MultiverseCore.commands,com.onarandombox.MultiverseCore.destination"/>
|
<module name="AnonInnerLength">
|
||||||
|
<property name="max" value="20"/>
|
||||||
</module>
|
</module>
|
||||||
<module name="IllegalImport"/>
|
<module name="ExecutableStatementCount">
|
||||||
<module name="RedundantImport"/>
|
<property name="max" value="30"/>
|
||||||
<module name="UnusedImports">
|
</module>
|
||||||
<property name="processJavadoc" value="true"/>
|
<module name="LambdaBodyLength">
|
||||||
|
<property name="max" value="10"/>
|
||||||
|
</module>
|
||||||
|
<module name="MethodCount">
|
||||||
|
<property name="maxTotal" value="100"/>
|
||||||
|
<property name="maxPrivate" value="100"/>
|
||||||
|
<property name="maxPackage" value="100"/>
|
||||||
|
<property name="maxProtected" value="100"/>
|
||||||
|
<property name="maxPublic" value="100"/>
|
||||||
</module>
|
</module>
|
||||||
<module name="MethodLength">
|
<module name="MethodLength">
|
||||||
|
<property name="max" value="50"/>
|
||||||
<property name="severity" value="warning"/>
|
<property name="severity" value="warning"/>
|
||||||
<property name="countEmpty" value="false"/>
|
|
||||||
</module>
|
</module>
|
||||||
<module name="ParameterNumber"/>
|
<module name="OuterTypeNumber">
|
||||||
|
<property name="max" value="1"/>
|
||||||
|
</module>
|
||||||
|
<module name="ParameterNumber">
|
||||||
|
<property name="max" value="3"/>
|
||||||
|
<property name="ignoreOverriddenMethods" value="true"/>
|
||||||
|
<property name="severity" value="warning"/>
|
||||||
|
</module>
|
||||||
|
<module name="RecordComponentNumber">
|
||||||
|
<property name="max" value="8"/>
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<!-- Whitespace -->
|
||||||
|
<module name="EmptyForInitializerPad"/>
|
||||||
<module name="EmptyForIteratorPad"/>
|
<module name="EmptyForIteratorPad"/>
|
||||||
|
<module name="EmptyLineSeparator">
|
||||||
|
<property name="allowNoEmptyLineBetweenFields" value="true"/>
|
||||||
|
<property name="allowMultipleEmptyLines" value="false"/>
|
||||||
|
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
|
||||||
|
</module>
|
||||||
|
<module name="GenericWhitespace"/>
|
||||||
<module name="MethodParamPad"/>
|
<module name="MethodParamPad"/>
|
||||||
|
<module name="NoLineWrap"/>
|
||||||
<module name="NoWhitespaceAfter">
|
<module name="NoWhitespaceAfter">
|
||||||
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
|
<property name="tokens" value="AT,INC,DEC,UNARY_MINUS,UNARY_PLUS,BNOT,LNOT,DOT,ARRAY_DECLARATOR,INDEX_OP,LITERAL_SYNCHRONIZED,METHOD_REF"/>
|
||||||
|
</module>
|
||||||
|
<module name="NoWhitespaceBefore">
|
||||||
|
<property name="tokens" value="COMMA,SEMI,POST_INC,POST_DEC,DOT,GENERIC_START,GENERIC_END,ELLIPSIS,LABELED_STAT,METHOD_REF"/>
|
||||||
|
</module>
|
||||||
|
<module name="NoWhitespaceBeforeCaseDefaultColon"/>
|
||||||
|
<module name="OperatorWrap">
|
||||||
|
<property name="tokens" value="QUESTION,COLON,EQUAL,NOT_EQUAL,DIV,PLUS,MINUS,STAR,MOD,SR,BSR,GE,GT,SL,LE,LT,BXOR,BOR,LOR,BAND,LAND,LITERAL_INSTANCEOF,TYPE_EXTENSION_AND,ASSIGN,DIV_ASSIGN,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,MOD_ASSIGN,SR_ASSIGN,BSR_ASSIGN,SL_ASSIGN,BXOR_ASSIGN,BOR_ASSIGN,BAND_ASSIGN,METHOD_REF"/>
|
||||||
</module>
|
</module>
|
||||||
<module name="NoWhitespaceBefore"/>
|
|
||||||
<module name="OperatorWrap"/>
|
|
||||||
<module name="ParenPad"/>
|
<module name="ParenPad"/>
|
||||||
|
<module name="SeparatorWrap">
|
||||||
|
<property name="option" value="nl"/>
|
||||||
|
<property name="tokens" value="DOT,AT,RPAREN,METHOD_REF"/>
|
||||||
|
</module>
|
||||||
|
<module name="SeparatorWrap">
|
||||||
|
<property name="option" value="eol"/>
|
||||||
|
<property name="tokens" value="COMMA,SEMI,ELLIPSIS,LPAREN,ARRAY_DECLARATOR,RBRACK"/>
|
||||||
|
</module>
|
||||||
|
<module name="SingleSpaceSeparator"/>
|
||||||
<module name="TypecastParenPad"/>
|
<module name="TypecastParenPad"/>
|
||||||
<module name="WhitespaceAfter">
|
<module name="WhitespaceAfter"/>
|
||||||
<property name="severity" value="warning"/>
|
<module name="WhitespaceAround"/>
|
||||||
</module>
|
|
||||||
<module name="WhitespaceAround">
|
|
||||||
<property name="severity" value="warning"/>
|
|
||||||
</module>
|
|
||||||
<module name="ModifierOrder"/>
|
|
||||||
<module name="RedundantModifier"/>
|
|
||||||
<module name="AvoidNestedBlocks"/>
|
|
||||||
<module name="EmptyBlock">
|
|
||||||
<property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_FOR,LITERAL_TRY,LITERAL_WHILE,INSTANCE_INIT,STATIC_INIT"/>
|
|
||||||
</module>
|
|
||||||
<module name="LeftCurly"/>
|
|
||||||
<module name="RightCurly"/>
|
|
||||||
<module name="EmptyStatement"/>
|
|
||||||
<module name="EqualsHashCode"/>
|
|
||||||
<module name="HiddenField">
|
|
||||||
<property name="tokens" value="VARIABLE_DEF"/><!-- We don't care if parameters hide fields. -->
|
|
||||||
</module>
|
|
||||||
<module name="IllegalInstantiation"/>
|
|
||||||
<module name="InnerAssignment"/>
|
|
||||||
<module name="MagicNumber">
|
|
||||||
<property name="ignoreNumbers" value="-1, 0, 0.5, 1, 2, 3"/>
|
|
||||||
</module>
|
|
||||||
<module name="MissingSwitchDefault"/>
|
|
||||||
<module name="SimplifyBooleanExpression"/>
|
|
||||||
<module name="SimplifyBooleanReturn"/>
|
|
||||||
<!-- Don't like errors for `final` missing
|
|
||||||
<module name="DesignForExtension"/>
|
|
||||||
<module name="FinalClass"/>
|
|
||||||
-->
|
|
||||||
<module name="HideUtilityClassConstructor"/>
|
|
||||||
<module name="InterfaceIsType"/>
|
|
||||||
<module name="VisibilityModifier">
|
|
||||||
<property name="protectedAllowed" value="true"/>
|
|
||||||
</module>
|
|
||||||
<module name="ArrayTypeStyle"/>
|
|
||||||
<!-- Don't like errors for `final` missing
|
|
||||||
<module name="FinalParameters"/>
|
|
||||||
-->
|
|
||||||
<module name="TodoComment">
|
|
||||||
<property name="severity" value="info"/>
|
|
||||||
</module>
|
|
||||||
<module name="UpperEll"/>
|
|
||||||
<module name="Indentation"/>
|
|
||||||
<module name="MissingDeprecated"/>
|
|
||||||
<module name="MissingOverride"/>
|
|
||||||
</module>
|
</module>
|
||||||
</module>
|
</module>
|
||||||
|
Loading…
Reference in New Issue
Block a user