Repository navigation
Expand file tree
/
Copy pathphpmd.xml
More file actions
30 lines (30 loc) · 1.43 KB
/
Copy pathphpmd.xml
File metadata and controls
30 lines (30 loc) · 1.43 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- SPDX-FileCopyrightText: 2026 The Gatepost authors -->
<!-- SPDX-License-Identifier: Apache-2.0 -->
<ruleset name="gatepost"
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">
<description>Size and complexity limits from php.md, for TELL-2 and TELL-3.</description>
<!-- The generator writes these files. Their length is data, not logic. -->
<exclude-pattern>src/Internal/NfkcTable.php</exclude-pattern>
<exclude-pattern>src/Internal/SpecData.php</exclude-pattern>
<!-- PHPMD reports a value at or above each threshold. -->
<rule ref="rulesets/codesize.xml">
<exclude name="CyclomaticComplexity"/>
<exclude name="ExcessiveParameterList"/>
<!-- TELL-2 already limits complexity, and early returns are the advised style. -->
<exclude name="NPathComplexity"/>
</rule>
<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
<properties>
<!-- TELL-2 allows a complexity of 10, so PHPMD reports from 11. -->
<property name="reportLevel" value="11"/>
</properties>
</rule>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList">
<properties>
<property name="minimum" value="5"/>
</properties>
</rule>
</ruleset>