Repository navigation
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
67 lines (53 loc) · 2.15 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
67 lines (53 loc) · 2.15 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
<?xml version="1.0"?>
<ruleset name="HM REST Ability">
<description>PHP Coding Standards for HM REST Ability</description>
<!-- Set the PHP version for PHP_CodeSniffer / HM Linter. -->
<config name="php_version" value="80200"/>
<!-- Set a minimum PHP version for PHPCompatibility. -->
<config name="testVersion" value="8.2-"/>
<!-- Set a high memory limit. -->
<ini name="memory_limit" value="1024M"/>
<!-- Show sniff codes in all reports. -->
<arg value="ps"/>
<!-- Use colors in output. -->
<arg name="colors"/>
<!-- Check PHP files only. -->
<arg name="extensions" value="php"/>
<!-- Files to check. -->
<file>.</file>
<!-- Exclude dependencies and generated output. -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<!-- Test fixtures (incl. faked, unnamespaced WP core classes) aren't
held to application code standards. -->
<exclude-pattern>*/tests/*</exclude-pattern>
<!-- Check for PHP cross-version compatibility. -->
<rule ref="PHPCompatibilityWP"/>
<!-- Use the Human Made coding standards. -->
<rule ref="HM">
<!-- Don't restrict namespaced functions to `namespace.php`. -->
<exclude name="HM.Files.FunctionFileName.WrongFile"/>
<!-- Don't force namespace Foo_Bar into directory foo_bar. -->
<exclude name="HM.Files.NamespaceDirectoryName"/>
<!-- Allow short `@var` notation. -->
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<!-- Faulty sniff still bundled in the HM standard. -->
<exclude name="PSR2R.Namespaces.UseInAlphabeticalOrder.Order"/>
</rule>
<!-- The main plugin file both declares symbols and calls require_once(). -->
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>hm-rest-ability.php</exclude-pattern>
</rule>
<!-- inc/*.php files register hooks at the top level by design. -->
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>inc/*.php</exclude-pattern>
</rule>
<!-- Text domain should be hm-rest-ability. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="hm-rest-ability"/>
</property>
</properties>
</rule>
</ruleset>