-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
70 lines (61 loc) · 2.37 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
70 lines (61 loc) · 2.37 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
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
<?xml version="1.0"?>
<ruleset name="Shim MCP">
<description>Coding standards for Shim MCP.</description>
<file>.</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>bin/*</exclude-pattern>
<arg name="extensions" value="php"/>
<arg name="colors"/>
<arg value="ps"/>
<arg name="parallel" value="8"/>
<config name="minimum_wp_version" value="6.7"/>
<config name="testVersion" value="8.0-"/>
<rule ref="WordPress-Extra">
<exclude name="Squiz.Commenting"/>
<exclude name="Generic.Commenting"/>
<exclude name="WordPress.Files.FileName"/>
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
<exclude name="Generic.Files.OneObjectStructurePerFile"/>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="shim_mcp"/>
<element value="ShimMcp"/>
<element value="SHIM_MCP"/>
</property>
</properties>
</rule>
<!-- The vendored server layer fires mcp_adapter_* filters. Those names are
upstream's public API and code written against the MCP Adapter hooks
them, so they keep their original prefix. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound">
<exclude-pattern>includes/Server/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="shim-mcp"/>
</property>
</properties>
</rule>
<rule ref="PHPCompatibilityWP"/>
<!-- includes/Server/ is vendored from WordPress/mcp-adapter. Upstream owns its
formatting; we sniff it for correctness and security, not house style. -->
<rule ref="Universal.Operators.DisallowShortTernary">
<exclude-pattern>includes/Server/*</exclude-pattern>
</rule>
<rule ref="WordPress.PHP.YodaConditions">
<exclude-pattern>includes/Server/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.I18n.MissingTranslatorsComment">
<exclude-pattern>includes/Server/*</exclude-pattern>
</rule>
<!-- Ability and filter callbacks have a signature fixed by the API that calls
them; a read-only ability legitimately ignores its $input argument. -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<exclude-pattern>includes/Server/*</exclude-pattern>
<exclude-pattern>includes/Abilities/*</exclude-pattern>
</rule>
</ruleset>