-
Notifications
You must be signed in to change notification settings - Fork 12
/
pmd-ruleset.xml
30 lines (30 loc) · 2.49 KB
/
pmd-ruleset.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0"?>
<ruleset name="PMD-Rules">
<description>AMP Validator PMD rules.</description>
<!-- String instantiation -->
<rule ref="category/java/performance.xml/StringInstantiation"><priority>1</priority></rule>
<rule ref="category/java/performance.xml/BooleanInstantiation"><priority>1</priority></rule>
<rule ref="category/java/errorprone.xml/UnconditionalIfStatement"><priority>1</priority></rule>
<!-- Guards around log statements -->
<rule ref="category/java/bestpractices.xml/GuardLogStatement"><priority>1</priority></rule>
<!-- Rules about throwing and catching exceptions -->
<rule ref="category/java/errorprone.xml/AvoidCatchingThrowable"><priority>1</priority></rule>
<rule ref="category/java/design.xml/SignatureDeclareThrowsException"><priority>1</priority></rule>
<rule ref="category/java/design.xml/ExceptionAsFlowControl"><priority>1</priority></rule>
<rule ref="category/java/errorprone.xml/AvoidCatchingNPE"><priority>1</priority></rule>
<!--<rule ref="rulesets/java/strictexception.xml/AvoidThrowingRawExceptionTypes"><priority>1</priority></rule> -->
<rule ref="category/java/design.xml/AvoidThrowingNullPointerException"><priority>1</priority></rule>
<!--<rule ref="rulesets/java/strictexception.xml/AvoidRethrowingException"><priority>1</priority></rule> -->
<rule ref="category/java/design.xml/DoNotExtendJavaLangError"><priority>1</priority></rule>
<rule ref="category/java/errorprone.xml/DoNotThrowExceptionInFinally"><priority>1</priority></rule>
<!--<rule ref="rulesets/java/strictexception.xml/AvoidThrowingNewInstanceOfSameException"><priority>1</priority></rule> -->
<!--<rule ref="rulesets/java/strictexception.xml/AvoidCatchingGenericException"><priority>1</priority></rule> -->
<!--<rule ref="rulesets/java/strictexception.xml/AvoidLosingExceptionInformation"><priority>1</priority></rule> -->
<!-- Cyclomatic Complexity -->
<!-- <rule ref="rulesets/java/codesize.xml/CyclomaticComplexity"><priority>1</priority></rule> -->
<!-- A collection of rules that find unused code -->
<!--<rule ref="rulesets/java/unusedcode.xml/UnusedPrivateField"><priority>1</priority></rule> -->
<!--<rule ref="rulesets/java/unusedcode.xml/UnusedLocalVariable"><priority>1</priority></rule> -->
<!--<rule ref="rulesets/java/unusedcode.xml/UnusedPrivateMethod"><priority>1</priority></rule> -->
<!--<rule ref="rulesets/java/unusedcode.xml/UnusedFormalParameter"><priority>1</priority></rule> -->
</ruleset>