-
Notifications
You must be signed in to change notification settings - Fork 19
/
phpmd.xml
66 lines (58 loc) · 2.64 KB
/
phpmd.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0"?>
<ruleset name="mpapi-client"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<rule ref="rulesets/cleancode.xml">
<description>Allow "else" expression.</description>
<exclude name="ElseExpression"/>
<description>Allow factory methods.</description>
<exclude name="StaticAccess"/>
<description>Allow DTOs and Entities that contain bool properties (there is no way to add exceptions).</description>
<exclude name="BooleanArgumentFlag"/>
</rule>
<rule ref="rulesets/naming.xml">
<description>Exclude variable and method length restriction to allow custom length definition.</description>
<exclude name="ShortVariable"/>
<exclude name="LongVariable"/>
</rule>
<rule ref="rulesets/naming.xml/ShortVariable">
<description>Allow variables with name length of 2 characters (e.g. $id, $to).</description>
<properties>
<property name="minimum" value="2"/>
<property name="exceptions" value="e"/>
</properties>
</rule>
<rule ref="rulesets/naming.xml/LongVariable">
<description>Allow variables with name length up to 30 characters.</description>
<properties>
<property name="maximum" value="30"/>
</properties>
</rule>
<rule ref="rulesets/codesize.xml">
<description>Allow entities with more than 10 parameters.</description>
<exclude name="ExcessiveParameterList"/>
<description>Allow entities with more than 15 fields.</description>
<exclude name="TooManyFields"/>
<description>Allow clients with more public methods.</description>
<exclude name="TooManyPublicMethods"/>
</rule>
<rule ref="rulesets/codesize.xml/TooManyPublicMethods">
<properties>
<property name="maxmethods" value="15"/>
<property name="ignorepattern" value="(^(set|get|is|has))i"/>
</properties>
</rule>
<rule ref="rulesets/controversial.xml"/>
<rule ref="rulesets/design.xml">
<exclude name="CouplingBetweenObjects"/>
</rule>
<rule ref="rulesets/design.xml/CouplingBetweenObjects">
<description>Allow MpApiClient itself, which couples all domain clients together.</description>
<properties>
<property name="maximum" value="22"/>
</properties>
</rule>
<rule ref="rulesets/unusedcode.xml"/>
</ruleset>