-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpmd.xml
More file actions
33 lines (30 loc) · 1.2 KB
/
phpmd.xml
File metadata and controls
33 lines (30 loc) · 1.2 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
<?xml version="1.0"?>
<ruleset name="Request PHP Client PMD">
<description>PHPMD rules approximating SonarJS checks</description>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>generated/*</exclude-pattern>
<exclude-pattern>specs/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>src/RequestClient.php</exclude-pattern>
<!-- Enable core rule sets early to avoid drift. -->
<rule ref="rulesets/codesize.xml">
<exclude name="CyclomaticComplexity"/>
<exclude name="NPathComplexity"/>
</rule>
<rule ref="rulesets/cleancode.xml"/>
<rule ref="rulesets/unusedcode.xml"/>
<rule ref="rulesets/naming.xml"/>
<!-- design.xml skipped: the StaticAccess rule conflicts with factory patterns; we enforce via reviews. -->
<!-- design.xml omitted for now (StaticAccess is too strict for factory methods) -->
<!-- Cognitive/Cyclomatic complexity thresholds -->
<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
<properties>
<property name="reportLevel" value="15"/>
</properties>
</rule>
<rule ref="rulesets/codesize.xml/NPathComplexity">
<properties>
<property name="minimum" value="200"/>
</properties>
</rule>
</ruleset>