-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
38 lines (30 loc) · 1.22 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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>
<file>.</file>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/phpunit/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/index.php</exclude-pattern>
<exclude-pattern>*/index.asset.php</exclude-pattern>
<!-- Only check PHP files. -->
<arg name="extensions" value="php"/>
<!-- Show progress, show the error codes for each message (source). -->
<arg value="ps"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./"/>
<!-- Check up to 8 files simultaneously. -->
<arg name="parallel" value="8"/>
<!-- Use WordPress ruleset. -->
<rule ref="WordPress">
<exclude name="WordPress.WP.I18n" />
</rule>
<rule ref="WordPress.Files.FileName">
<exclude-pattern>*/phpunit/tests/*\.php$</exclude-pattern>
</rule>
<!-- Add in some extra rules from other standards. -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
</ruleset>