-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.phpcs.xml
41 lines (31 loc) · 1.26 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
<?xml version="1.0"?>
<ruleset name="Custom Permalinks">
<description>Custom Permalinks rules for PHP_CodeSniffer</description>
<file>.</file>
<!-- Exclude dependency related files and generated files from being scanned. -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>index.php</exclude-pattern>
<!-- Only check PHP files. -->
<arg name="extensions" value="php"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="."/>
<!-- Show results with colors. -->
<arg name="colors"/>
<!-- Show progress, show the error codes for each message (source). -->
<arg value="sp"/>
<!-- Run against the PHPCompatibilityWP ruleset. -->
<rule ref="PHPCompatibilityWP"/>
<!-- Run against the WordPress ruleset. -->
<rule ref="WordPress" />
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="cp_view_post_permalinks" />
<element value="cp_view_category_permalinks" />
</property>
</properties>
</rule>
<!-- Check for cross-version support for PHP 7.0 and higher. -->
<config name="testVersion" value="7.0-"/>
</ruleset>