forked from a-z-listing/a-z-listing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
77 lines (64 loc) · 2.66 KB
/
phpcs.xml.dist
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
73
74
75
76
77
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>
<!-- What to scan -->
<file>.</file>
<!-- Exclude built assets -->
<exclude-pattern>/build/</exclude-pattern>
<!-- Exclude node_modules -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<!-- Exclude tests -->
<exclude-pattern>/tests/</exclude-pattern>
<!-- Exclude vendor directories -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>/wp-includes</exclude-pattern>
<exclude-pattern>scoper.inc.php</exclude-pattern>
<!-- Colors! Nice! -->
<arg name="colors"/>
<!--- Only check PHP files -->
<arg name="extensions" value="php"/>
<!-- Commandline options for PHPCS -->
<arg value="s"/>
<arg value="n"/>
<!-- Strip the file paths down to the relevant bit -->
<arg name="basepath" value="./"/>
<!-- Enables parallel processing when available for faster results. -->
<arg name="parallel" value="8"/>
<!-- Rules: Check PHP version compatibility -->
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
<config name="testVersion" value="7.0-"/>
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/>
<rule ref="Squiz.PHP.Eval"/>
<!-- Rules: WordPress Coding Standards -->
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="4.6"/>
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
</rule>
<rule ref="WordPress-Docs" />
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma. -->
<property name="prefixes" type="array" value="a_z_listing,the_a_z_listing,have_a_z_,get_the_a_z,the_a_z"/>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<!-- Value: replace the text domain used. -->
<property name="text_domain" type="array" value="a-z-listing"/>
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
<properties>
<property name="blank_line_check" value="true"/>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="-"/>
</properties>
</rule>
</ruleset>