-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
76 lines (65 loc) · 2.54 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
76 lines (65 loc) · 2.54 KB
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
<?xml version="1.0"?>
<ruleset name="CartRebound">
<description>WordPress-Extra coding standards for the CartRebound framework.</description>
<!-- Scan the project root by default. -->
<file>.</file>
<arg name="extensions" value="php"/>
<arg name="basepath" value="."/>
<arg name="parallel" value="8"/>
<arg name="colors"/>
<arg value="sp"/>
<!-- Never scan generated or third-party code. -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/public/build/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<!-- Dev-only tooling configs run on the local PHP CLI, not inside WordPress. -->
<exclude-pattern>*/rector.php</exclude-pattern>
<exclude-pattern>*.php-cs-fixer.dist.php</exclude-pattern>
<exclude-pattern>*/scripts/bump-version.php</exclude-pattern>
<!-- Project compatibility targets. -->
<config name="minimum_wp_version" value="6.2"/>
<config name="testVersion" value="7.4-"/>
<!-- Core rulesets. -->
<rule ref="WordPress-Extra"/>
<rule ref="WordPress-Docs"/>
<!-- Enforce the text domain everywhere. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="cart-rebound"/>
</property>
</properties>
</rule>
<!-- Require every global symbol to carry a CartRebound prefix. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="cart_rebound"/>
<element value="CART_REBOUND"/>
<element value="CartRebound"/>
</property>
</properties>
</rule>
<!-- manage_woocommerce is provided by WooCommerce (a hard dependency), not a custom capability. -->
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="manage_woocommerce"/>
</property>
</properties>
</rule>
<!-- src/ follows PSR-4 StudlyCase, so the WP file-naming rule does not apply there. -->
<rule ref="WordPress.Files.FileName">
<exclude-pattern>*/src/*</exclude-pattern>
</rule>
<!--
The data layer performs direct custom-table access (there is no WordPress
API for custom tables) and the QueryBuilder assembles prepared statements
dynamically. Those specific, audited call sites carry narrowly-scoped,
justified `// phpcs:ignore` comments (honoured by both PHPCS and the
official Plugin Check). Every value is still bound via $wpdb->prepare()
with %i/%s/%d placeholders, and WordPress.DB.PreparedSQLPlaceholders stays
enabled everywhere.
-->
</ruleset>