-
Notifications
You must be signed in to change notification settings - Fork 0
/
pmd.xml
31 lines (28 loc) · 1.29 KB
/
pmd.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
31
<?xml version="1.0" encoding="utf-8"?>
<ruleset name="Inrupt PMD Rules"
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>
Inrupt PMD rules adapted for the Conformance Test Harness
</description>
<rule ref="category/java/security.xml"/>
<rule ref="category/java/multithreading.xml">
<exclude name="UseConcurrentHashMap"/>
<exclude name="DoNotUseThreads"/>
</rule>
<rule ref="category/java/performance.xml"/>
<rule ref="category/java/bestpractices.xml">
<exclude name="GuardLogStatement"/> <!-- Clutters with virtually no performance benefit in the test harness -->
</rule>
<rule ref="category/java/errorprone.xml">
<!-- This rule is unhelpful since CTH is all about testing -->
<exclude name="TestClassWithoutTestCases"/>
</rule>
<!-- 1 (the default) assert per unit test seems extremely restrictive. Just raising to 5. -->
<rule ref="category/java/bestpractices.xml/JUnitTestContainsTooManyAsserts">
<properties>
<property name="maximumAsserts" value="5" />
</properties>
</rule>
</ruleset>