-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.ruleset.xml
More file actions
55 lines (46 loc) · 2.11 KB
/
Copy pathtest.ruleset.xml
File metadata and controls
55 lines (46 loc) · 2.11 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0"?>
<ruleset name="mal-test-ruleset"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>MAL ruleset for testing code</description>
<rule ref="category/java/bestpractices.xml" />
<rule ref="category/java/codestyle.xml">
<!-- Avoid reporting variables with a short name -->
<exclude name="ShortVariable" />
<!-- Avoid reporting test classes without constructors -->
<exclude name="AtLeastOneConstructor" />
</rule>
<!-- Avoid reporting variables with a long name -->
<rule ref="category/java/codestyle.xml/LongVariable">
<properties>
<property name="minimum" value="45" />
</properties>
</rule>
<rule ref="category/java/design.xml">
<!-- Avoid reporting usage of classes from outside the package hierarchy -->
<exclude name="LoosePackageCoupling" />
<!-- Avoid reporting big test files -->
<exclude name="TooManyMethods" />
<!-- Avoid reporting usage of data coming from "too far away" -->
<exclude name="LawOfDemeter" />
</rule>
<rule ref="category/java/documentation.xml">
<!-- Avoid reporting comments with too many lines -->
<exclude name="CommentSize" />
<!-- Avoid reporting missing comments on private fields -->
<exclude name="CommentRequired" />
<!-- Avoid reporting constructors with empty body -->
<exclude name="UncommentedEmptyConstructor" />
</rule>
<rule ref="category/java/errorprone.xml" />
<rule ref="category/java/multithreading.xml">
<!-- Avoid reporting anything related to java.lang.Thread or Executors -->
<exclude name="DoNotUseThreads" />
</rule>
<rule ref="category/java/performance.xml">
<!-- Avoid reporting redundant field initialization -->
<exclude name="RedundantFieldInitializer" />
</rule>
<rule ref="category/java/security.xml" />
</ruleset>