-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathphpcs.xml
61 lines (53 loc) · 1.75 KB
/
phpcs.xml
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
<?xml version="1.0"?>
<ruleset>
<description>PHP_CodeSniffer rules for WP Asset Manager.</description>
<arg value="ps" />
<arg name="parallel" value="8" />
<exclude-pattern>tests/</exclude-pattern>
<!-- Include Alley Rules -->
<rule ref="Alley-Interactive" />
<!-- Project customizations go here -->
<rule ref="WordPress.WP.I18n">
<properties>
<!--
Verify that the text_domain is set to the desired text-domain.
Multiple valid text domains can be provided as a comma-delimited list.
-->
<property name="text_domain" type="array" value="am" />
</properties>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="am_"/>
<element value="Asset_Manager"/>
<element value="Alley\WP\"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName">
<properties>
<property name="allowed_custom_properties" type="array">
<element value="childNodes"/>
<element value="nodeName"/>
<element value="parentNode"/>
</property>
</properties>
</rule>
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<!--
WordPress.com VIP does not propagate wp_cache_set data across datacenters,
largely to avoid attempting to propagate large (>50k) data for batcache.
-->
<property name="forbiddenFunctions" type="array" value="wp_cache_add=>wp_cache_set" />
<!-- This is the newer format, only supported in PHPCS 3.3.0+
<property name="forbiddenFunctions" type="array">
<element key="wp_cache_add" value="wp_cache_set"/>
</property> -->
</properties>
</rule>
</ruleset>