-
Notifications
You must be signed in to change notification settings - Fork 14
/
phpcs.xml
55 lines (45 loc) · 1.66 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
55
<?xml version="1.0"?>
<!--
Customize the rules WP Enforcer uses by editing this file according to PHP_CodeSniffer's
ruleset.xml standard: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
-->
<ruleset name="wp101">
<description>Coding standards for WP101.</description>
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<file>.</file>
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<!-- FILES -->
<exclude-pattern>assets/*</exclude-pattern>
<exclude-pattern>dist/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<!-- Temporary exclusion for legacy code. -->
<exclude-pattern>integrations/*</exclude-pattern>
<!-- PHP Compatibility sniffs. -->
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="5.4-" />
<!-- Long conditionals. -->
<rule ref="Squiz.Commenting.LongConditionClosingComment.Missing">
<exclude-pattern>*</exclude-pattern>
</rule>
<!-- Don't worry about missing class comments on tests. -->
<rule ref="Squiz.Commenting.ClassComment.Missing">
<exclude-pattern>includes/class-*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting">
<exclude-pattern>includes/class-wp101-plugin.php</exclude-pattern>
</rule>
<!--
Don't get angry about checking files that don't contain code
@link https://github.com/stevegrunwell/wp-enforcer/issues/12
-->
<rule ref="Internal.NoCodeFound">
<severity>0</severity>
</rule>
<rule ref="WordPress-Extra" />
<rule ref="WordPress-Docs" />
</ruleset>