blob: 8bdc1e5d36a805652369c55c94cea3448f2857d4 (
plain)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
<?xml version="1.0"?>
<ruleset name="cepis-woocommerce">
<description>WordPress coding standards for the plugin's own code.</description>
<file>.</file>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/dist/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<!--
The bundled client is PSR-12 upstream and is copied in verbatim by
tools/update-vendor.sh. Reformatting it here would make every refresh a
merge conflict.
-->
<exclude-pattern>/lib/cepis/*</exclude-pattern>
<arg name="extensions" value="php"/>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg value="sp"/>
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
</rule>
<config name="minimum_wp_version" value="6.9"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="cepis-woocommerce"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="cepis_woo"/>
<element value="Cepis_Woo"/>
<element value="CEPIS_WOO"/>
<element value="cepis_woocommerce"/>
</property>
</properties>
</rule>
<!--
Properties of the bundled client, which is English camelCase by design
and is not this plugin's to rename.
-->
<rule ref="WordPress.NamingConventions.ValidVariableName">
<properties>
<property name="allowed_custom_properties" type="array">
<element value="retryAfter"/>
<element value="baseUrl"/>
<element value="userAgent"/>
</property>
</properties>
</rule>
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="manage_woocommerce"/>
</property>
</properties>
</rule>
<!--
Both files delete transients by prefix, and WordPress has no API for
that: `delete_transient()` needs the exact key. The query is prepared
and the result is fed straight back into `delete_transient()`, so the
caching the sniff asks for is the very thing being cleared.
-->
<rule ref="WordPress.DB.DirectDatabaseQuery">
<exclude-pattern>/uninstall.php</exclude-pattern>
<exclude-pattern>/includes/class-cepis-woo-lookup.php</exclude-pattern>
</rule>
</ruleset>
|