-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
54 lines (47 loc) · 1.85 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
<?xml version="1.0" ?>
<ruleset
name="WordPress Plugin"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"
>
<description>WordPress Plugin Boilerplate Coding Standard</description>
<!-- Set the coding standard -->
<rule ref="WordPress">
<!-- Exclude specific rules -->
<exclude name="Generic.Commenting.DocComment"/>
<exclude name="Squiz.Commenting.ClassComment"/>
<exclude name="Squiz.Commenting.FileComment"/>
<exclude name="Universal.Operators.DisallowShortTernary"/>
<exclude name="WordPress.Files.FileName"/>
<exclude name="WordPress.PHP.YodaConditions"/>
<exclude name="WordPress.Security.NonceVerification"/>
</rule>
<!-- Add the text domain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="wordpress-plugin-boilerplate"/>
</property>
</properties>
</rule>
<!-- Add custom capabilities -->
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="manage_wordpress_plugin_boilerplate"/>
</property>
</properties>
</rule>
<!-- Set the target directories -->
<file>wordpress-plugin-boilerplate.php</file>
<file>src/functions</file>
<file>src/includes</file>
<file>src/templates</file>
<!-- Set the excluded directories -->
<exclude-pattern>./vendor/*</exclude-pattern>
<exclude-pattern>./tests/*</exclude-pattern>
<!-- Set the options -->
<arg name="extensions" value="php,inc"/>
<arg name="parallel" value="80"/>
<arg name="cache" value=".phpcs.cache"/>
</ruleset>