-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
58 lines (52 loc) · 1.91 KB
/
phpcs.xml.dist
File metadata and controls
58 lines (52 loc) · 1.91 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
<?xml version="1.0"?>
<ruleset name="Desktop Mode">
<description>Coding standards for the Desktop Mode plugin.</description>
<!--
Files this ruleset applies to. Extensions live in this monorepo
for development convenience but ship as separate WordPress
plugins; they're scanned independently against their own ruleset
and excluded here so their text-domains and prefixes don't trip
the parent-plugin scan.
-->
<file>.</file>
<exclude-pattern>/extensions/</exclude-pattern>
<exclude-pattern>/node_modules/</exclude-pattern>
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/dist/</exclude-pattern>
<exclude-pattern>/assets/vendor/</exclude-pattern>
<exclude-pattern>/tests/</exclude-pattern>
<!-- Inherit the WordPress plugin standard. -->
<rule ref="WordPress"/>
<!--
Custom prefix allowlist.
The Plugin Check derives the canonical prefix from the plugin
slug (`desktop-mode`) — `desktop_mode_*` and `desktop-mode_*`
are accepted automatically. We add `wpdc`, `WPDM`, and
`WP_DESKTOP` as legacy short forms used by a small set of
internal identifiers (constants like `WP_DESKTOP_PRESENCE_OPTION`,
window ids like `wpdc-recycle-bin`) — kept for continuity.
-->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="desktop_mode"/>
<element value="desktop-mode"/>
<element value="wpdc"/>
<element value="WPDM"/>
<element value="WP_DESKTOP"/>
<element value="DESKTOP_MODE"/>
</property>
</properties>
</rule>
<!-- Text domain consistency. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="desktop-mode"/>
</property>
</properties>
</rule>
<!-- PHP / WP version targets — match plugin headers. -->
<config name="testVersion" value="7.4-"/>
<config name="minimum_supported_wp_version" value="6.0"/>
</ruleset>