<!--
Custom rule set
- for PMD [ https://pmd.github.io/ ] 5.5.2 or later
+ for PMD [ https://pmd.github.io/ ] 6.13.0 or later
- Copyright(c) 2016 olyutorskii
+ Copyright(c) 2019 olyutorskii
-->
<ruleset
custom rulesets
</description>
- <rule ref="rulesets/java/android.xml" />
+ <rule ref="category/java/bestpractices.xml" />
- <rule ref="rulesets/java/basic.xml" />
-
- <rule ref="rulesets/java/braces.xml">
+ <rule ref="category/java/codestyle.xml" >
+ <exclude name="CommentDefaultAccessModifier" />
+ <exclude name="DefaultPackage" />
<exclude name="IfElseStmtsMustUseBraces" />
<exclude name="IfStmtsMustUseBraces" />
+ <exclude name="LocalVariableCouldBeFinal" />
+ <exclude name="MethodArgumentCouldBeFinal" />
+ <exclude name="OnlyOneReturn" />
+ <exclude name="UnnecessaryLocalBeforeReturn" />
+ <exclude name="UnnecessaryReturn" />
</rule>
-
- <rule ref="rulesets/java/clone.xml" />
-
- <rule ref="rulesets/java/codesize.xml" />
-
- <rule ref="rulesets/java/comments.xml">
- <exclude name="CommentDefaultAccessModifier" />
- </rule>
- <rule ref="rulesets/java/comments.xml/CommentRequired" >
+ <rule ref="category/java/codestyle.xml/ControlStatementBraces" >
<properties>
- <property name="fieldCommentRequirement" value="Ignored"/>
+ <property name="checkIfElseStmt" value="false"/>
+ <property name="checkSingleIfStmt" value="false"/>
</properties>
</rule>
- <rule ref="rulesets/java/comments.xml/CommentSize" >
+ <rule ref="category/java/codestyle.xml/LongVariable" >
<properties>
- <property name="maxLines" value="25"/>
+ <property name="minimum" value="25"/>
</properties>
</rule>
-
- <rule ref="rulesets/java/controversial.xml">
- <exclude name="DefaultPackage" />
- <exclude name="OnlyOneReturn" />
- <exclude name="DataflowAnomalyAnalysis" />
- <exclude name="AvoidLiteralsInIfCondition" />
+ <rule ref="category/java/codestyle.xml/ShortVariable" >
+ <properties>
+ <property name="minimum" value="2"/>
+ </properties>
</rule>
- <rule ref="rulesets/java/coupling.xml">
- <exclude name="LoosePackageCoupling" />
+ <rule ref="category/java/design.xml" >
+ <exclude name="AvoidThrowingNullPointerException" />
+ <exclude name="AvoidUncheckedExceptionsInSignatures" />
<exclude name="LawOfDemeter" />
+ <exclude name="LoosePackageCoupling" />
</rule>
-
- <rule ref="rulesets/java/design.xml">
- <exclude name="UnnecessaryLocalBeforeReturn" />
- <exclude name="FieldDeclarationsShouldBeAtStartOfClass" />
- </rule>
-
- <rule ref="rulesets/java/empty.xml" />
-
- <rule ref="rulesets/java/finalizers.xml" />
-
- <rule ref="rulesets/java/imports.xml" />
-
- <rule ref="rulesets/java/j2ee.xml">
- <exclude name="DoNotUseThreads" />
+ <rule ref="category/java/design.xml/NcssCount" >
+ <properties>
+ <property name="methodReportLevel" value="50"/>
+ </properties>
</rule>
- <rule ref="rulesets/java/logging-jakarta-commons.xml" />
-
- <rule ref="rulesets/java/javabeans.xml">
- <exclude name="BeanMembersShouldSerialize" />
+ <rule ref="category/java/documentation.xml" />
+ <rule ref="category/java/documentation.xml/CommentRequired" >
+ <properties>
+ <property name="fieldCommentRequirement" value="Ignored"/>
+ </properties>
</rule>
-
- <rule ref="rulesets/java/logging-java.xml" />
-
- <rule ref="rulesets/java/junit.xml" />
-
- <rule ref="rulesets/java/migrating.xml" />
-
- <rule ref="rulesets/java/naming.xml">
- <exclude name="ShortVariable" />
- <exclude name="LongVariable" />
+ <rule ref="category/java/documentation.xml/CommentSize" >
+ <properties>
+ <property name="maxLines" value="25"/>
+ </properties>
</rule>
- <rule ref="rulesets/java/optimizations.xml">
- <exclude name="LocalVariableCouldBeFinal" />
- <exclude name="MethodArgumentCouldBeFinal" />
- <exclude name="RedundantFieldInitializer" />
+ <rule ref="category/java/errorprone.xml" >
+ <exclude name="AvoidLiteralsInIfCondition" />
+ <exclude name="BeanMembersShouldSerialize" />
+ <exclude name="DataflowAnomalyAnalysis" />
</rule>
- <rule ref="rulesets/java/strictexception.xml" />
+ <rule ref="category/java/multithreading.xml" />
- <rule ref="rulesets/java/strings.xml">
+ <rule ref="category/java/performance.xml" >
<exclude name="ConsecutiveAppendsShouldReuse" />
+ <exclude name="RedundantFieldInitializer" />
</rule>
- <rule ref="rulesets/java/sunsecure.xml" />
+ <rule ref="category/java/security.xml" />
- <rule ref="rulesets/java/typeresolution.xml" />
-
- <rule ref="rulesets/java/unnecessary.xml">
- <exclude name="UnnecessaryReturn" />
- </rule>
+ <!--rule ref="category/pom/errorprone.xml" /-->
- <rule ref="rulesets/java/unusedcode.xml" />
+ <!--rule ref="category/xml/errorprone.xml" /-->
</ruleset>