-
Notifications
You must be signed in to change notification settings - Fork 189
/
phpmd.xml
87 lines (82 loc) · 2.98 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0"?>
<!-- see https://phpmd.org/rules/index.html -->
<ruleset
name="Claroline distribution PHPMD rule set"
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>Code checks</description>
<rule ref="rulesets/cleancode.xml/IfStatementAssignment">
<priority>1</priority>
</rule>
<rule ref="rulesets/cleancode.xml/DuplicatedArrayKey">
<priority>1</priority>
</rule>
<rule ref="rulesets/cleancode.xml/ErrorControlOperator">
<priority>1</priority>
</rule>
<rule ref="rulesets/cleancode.xml/UndefinedVariable">
<priority>1</priority>
</rule>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField">
<priority>1</priority>
</rule>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod">
<priority>1</priority>
</rule>
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable">
<priority>1</priority>
</rule>
<rule ref="rulesets/design.xml/ExitExpression">
<priority>1</priority>
</rule>
<rule ref="rulesets/design.xml/EvalExpression">
<priority>1</priority>
</rule>
<rule ref="rulesets/design.xml/GotoStatement">
<priority>1</priority>
</rule>
<rule ref="rulesets/design.xml/DevelopmentCodeFragment">
<priority>1</priority>
</rule>
<rule ref="rulesets/naming.xml/ConstantNamingConventions">
<priority>1</priority>
</rule>
<rule ref="rulesets/controversial.xml/Superglobals">
<priority>1</priority>
</rule>
<rule ref="rulesets/controversial.xml/CamelCaseClassName">
<priority>1</priority>
</rule>
<rule ref="rulesets/controversial.xml/CamelCasePropertyName">
<priority>1</priority>
</rule>
<rule ref="rulesets/controversial.xml/CamelCaseMethodName">
<priority>1</priority>
</rule>
<rule ref="rulesets/controversial.xml/CamelCaseParameterName">
<priority>1</priority>
</rule>
<rule ref="rulesets/controversial.xml/CamelCaseVariableName">
<priority>1</priority>
</rule>
<!-- These rules are not checked in the CI because it will need too many work to have them all -->
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter">
<!-- It also throws an error when params are declared to follow the parent method's prototype -->
<priority>2</priority>
</rule>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength">
<priority>2</priority>
</rule>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList">
<priority>2</priority>
</rule>
<rule ref="rulesets/codesize.xml/ExcessivePublicCount">
<priority>2</priority>
</rule>
<rule ref="rulesets/naming.xml/BooleanGetMethodName">
<priority>2</priority>
</rule>
</ruleset>