Repository navigation
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
72 lines (60 loc) · 2.76 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
72 lines (60 loc) · 2.76 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
71
72
<?xml version="1.0"?>
<ruleset name="HM Abilities MCP Coding Standards">
<description>Human Made Coding Standards</description>
<!-- What to scan -->
<file>./inc/</file>
<file>./tests/</file>
<file>hm-abilities-mcp.php</file>
<exclude-pattern>./vendor/</exclude-pattern>
<!-- How to scan -->
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="colors"/> <!-- Show results with colors (disable if working on Windows). -->
<arg name="basepath" value="."/>
<arg name="parallel" value="20"/>
<arg name="extensions" value="php"/>
<arg name="cache" value=".phpcs.cache"/>
<!-- 6.9 is the first release with the Abilities API in core. -->
<config name="minimum_supported_wp_version" value="6.9"/>
<rule ref="PHPCompatibilityWP"/>
<!-- Human Made Coding Standards -->
<rule ref="HM">
<!-- These stylistic-only rules are disabled temporarily and should be fixed in follow-up. -->
<exclude name="PSR12.Functions.ReturnTypeDeclaration.SpaceBeforeColon" />
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing" />
<exclude name="Squiz.Commenting" />
<exclude name="Squiz.Strings.ConcatenationSpacing" />
<exclude name="Generic.Commenting" />
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="NormalizedArrays.Arrays.ArrayBraceSpacing" />
<!-- Requiring inline tags to be on newlines makes render.php partials harder to read. -->
<exclude name="Squiz.PHP.EmbeddedPhp.ContentBeforeOpen" />
<exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterEnd" />
<!--
Every module file pairs symbol declarations with the standard WordPress
`defined( 'ABSPATH' ) || exit;` guard, which PSR-1 counts as a side
effect. The guard is required, so this rule can never be satisfied here.
-->
<exclude name="PSR1.Files.SideEffects" />
</rule>
<rule ref="HM.Files.NamespaceDirectoryName.NoIncDirectory">
<exclude-pattern>hm-abilities-mcp.php</exclude-pattern>
</rule>
<!--
The test scripts are WP-CLI programs, not part of the plugin runtime. They
print to stdout rather than to a page, and their helpers are global on
purpose: `wp eval-file` evaluates each test inside a function scope, so a
namespaced helper would not be reachable from the file under test.
-->
<rule ref="HM.Security.EscapeOutput">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<rule ref="HM.Functions.NamespacedFunctions">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.PHP.DevelopmentFunctions">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
<rule ref="HM.PHP.Isset">
<exclude-pattern>./tests/*</exclude-pattern>
</rule>
</ruleset>