-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathphpmd.xml.dist
81 lines (71 loc) · 3.41 KB
/
phpmd.xml.dist
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0"?>
<!--
To override this file, copy it to phpmd.xml and then modify.
@see https://phpmd.org/documentation/
-->
<ruleset name="PMD Ruleset for Drupal"
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">
<description>
LLNL PHP Mess Detector Code Validation for Custom Modules and Themes.
</description>
<!-- Import Clean Code Ruleset -->
<rule ref="rulesets/cleancode.xml">
<exclude name="StaticAccess" /> <!-- Exclude StaticAccess -->
<exclude name="MissingImport" /> <!-- Exclude MissingImport -->
<exclude name="IfStatementAssignment" /> <!-- Exclude ElseExpression -->
<exclude name="ElseExpression" /> <!-- Exclude ElseExpression -->
<exclude name="BooleanArgumentFlag" /> <!-- Exclude BooleanArgumentFlag -->
</rule>
<!-- Import Code Size Ruleset -->
<rule ref="rulesets/codesize.xml">
<exclude name="ExcessiveMethodLength" /> <!-- Exclude ExcessiveMethodLength (overridden below) -->
<exclude name="TooManyPublicMethods" /> <!-- Exclude TooManyPublicMethods (overridden below) -->
<exclude name="CyclomaticComplexity" /> <!-- Exclude CyclomaticComplexity (overridden below) -->
</rule>
<!-- Import Controversial Ruleset -->
<rule ref="rulesets/controversial.xml">
<exclude name="CamelCaseParameterName" /> <!-- Exclude CamelCaseParameterName -->
<exclude name="CamelCaseVariableName" /> <!-- Exclude CamelCaseVariableName -->
</rule>
<!-- Import Design Ruleset -->
<rule ref="rulesets/design.xml">
<exclude name="CouplingBetweenObjects" /> <!-- Exclude CouplingBetweenObjects -->
<exclude name="NumberOfChildren" /> <!-- Exclude NumberOfChildren -->
</rule>
<!-- Import Naming Ruleset -->
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" /> <!-- Exclude ShortVariable -->
<exclude name="LongVariable" /> <!-- Exclude LongVariable -->
<exclude name="ShortMethodName" /> <!-- Exclude ShortMethodName -->
<exclude name="LongClassName" /> <!-- Exclude LongClassName -->
</rule>
<!-- Import Unused Code Ruleset -->
<rule ref="rulesets/unusedcode.xml">
<exclude name="UnusedFormalParameter" /> <!-- Exclude UnusedFormalParameter -->
<exclude name="UnusedLocalVariable" /> <!-- Exclude UnusedLocalVariable -->
</rule>
<!-- ################################## -->
<!-- #### Begin Rule Customization #### -->
<!-- ################################## -->
<!-- Import and Override Code Size ExcessiveMethodLength Rule -->
<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
<properties>
<property name="reportLevel" description="The Cyclomatic Complexity reporting threshold" value="15"/>
</properties>
</rule>
<!-- Import and Override Code Size ExcessiveMethodLength Rule -->
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength">
<properties>
<property name="minimum" description="The method size reporting threshold" value="250"/>
</properties>
</rule>
<!-- Import and Override Code Size TooManyPublicMethods Rule -->
<rule ref="rulesets/codesize.xml/TooManyPublicMethods">
<properties>
<property name="maxmethods" description="The method count reporting threshold" value="15"/>
</properties>
</rule>
</ruleset>