-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathphpcs.xml.dist
59 lines (52 loc) · 2.24 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
52
53
54
55
56
57
58
59
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<description>PHP_CodeSniffer ruleset for WooCommerce Square.</description>
<config name="minimum_supported_wp_version" value="5.6" />
<config name="testVersion" value="7.4-" />
<arg value="psv"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="woocommerce-square" />
</properties>
</rule>
<rule ref="WooCommerce-Core">
<!-- We do not comply with these right now. -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents" />
<exclude name="WooCommerce.Commenting.CommentTags.AuthorTag" />
<exclude name="WooCommerce.Commenting.CommentTags.CopyrightTag" />
<exclude name="WooCommerce.Commenting.CommentTags.LicenseTag" />
<exclude name="Generic.Commenting" />
<exclude name="Squiz.Commenting" />
<exclude name="Squiz.PHP.DisallowMultipleAssignments" />
<exclude name="WooCommerce.Commenting.CommentTags.AuthorTag" />
<exclude name="WooCommerce.Commenting.CommentTags.CopyrightTag" />
<exclude name="WooCommerce.Commenting.CommentTags.LicenseTag" />
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customAutoEscapedFunctions" type="array" value="wc_price"/>
</properties>
</rule>
<!-- Files to check -->
<arg name="extensions" value="php"/>
<file>.</file>
<exclude-pattern>assets/</exclude-pattern>
<exclude-pattern>bin/</exclude-pattern>
<exclude-pattern>docker/</exclude-pattern>
<exclude-pattern>docs/</exclude-pattern>
<exclude-pattern>i18n/</exclude-pattern>
<exclude-pattern>wordpress-org-assets/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>build/</exclude-pattern>
<!-- Exclude the PHPCompatibilityWP ruleset -->
<rule ref="PHPCompatibilityWP">
<exclude name="PHPCompatibilityWP"/>
</rule>
<rule ref="WooCommerce.Commenting">
<!-- It wants @since to contain defined version and does not allow just x.x.x -->
<exclude name="WooCommerce.Commenting.CommentHooks.MissingSinceVersionComment"/>
</rule>
</ruleset>