-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
51 lines (43 loc) · 2.1 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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<description>A custom set of code standard rules to check for WordPress code.</description>
<!-- How to scan -->
<arg value="sp"/><!-- Show sniff and progress -->
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit -->
<arg name="extensions" value="php"/>
<arg name="parallel" value="10"/><!-- Enables parallel processing when available for faster results. -->
<arg name="cache" value=".phpcs.cache"/>
<!-- Check for cross-version support for PHP 8.3 and higher. -->
<config name="testVersion" value="8.3-"/>
<!-- Minimum WP version to check for usage of deprecated functions, classes and function parameters -->
<config name="minimum_supported_wp_version" value="6.6"/>
<!-- Rules: -->
<!-- What to scan -->
<file>wp-content/mu-plugins/</file>
<file>wp-content/plugins/</file>
<file>wp-content/themes/</file>
<!-- Exclude common files -->
<exclude-pattern>*/\.idea/*</exclude-pattern>
<exclude-pattern>*/\.github/*</exclude-pattern>
<exclude-pattern>*/\.idea/*</exclude-pattern>
<exclude-pattern>*/\.make/*</exclude-pattern>
<exclude-pattern>*/\.wordpress-org/*</exclude-pattern>
<exclude-pattern>*/assets/*</exclude-pattern>
<exclude-pattern>*/languages/*</exclude-pattern>
<exclude-pattern>*/lib/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/src/js/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*\.js</exclude-pattern>
<exclude-pattern>*\.mo</exclude-pattern>
<exclude-pattern>*\.po</exclude-pattern>
<exclude-pattern>*\.twig</exclude-pattern>
<exclude-pattern>*\.css</exclude-pattern>
<exclude-pattern>*\.scss</exclude-pattern>
<exclude-pattern>wp-content/uploads/</exclude-pattern>
<exclude-pattern>wp/*</exclude-pattern>
<exclude-pattern>tmp-wordpress-stubs.php</exclude-pattern>
<!-- Include the WordPress-Extra standard. -->
<!-- I surrender to array() -->
<rule ref="WordPress-Extra"/>
</ruleset>