Repository navigation
Expand file tree
/
Copy pathphpcs.xml
More file actions
56 lines (49 loc) · 2.42 KB
/
Copy pathphpcs.xml
File metadata and controls
56 lines (49 loc) · 2.42 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
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="LeadCapture Form">
<description>Uses the shared SilverAssistWP ruleset from silverassist/wp-coding-standards, with this repo's own modern-PHP style exceptions layered on top (short ternaries, non-Yoda conditions, eval/dev-functions in test helpers, procedural init fn alongside a class) -- candidates for the shared ruleset itself, not yet folded in since that's a style decision affecting every consumer, not just this repo.</description>
<!-- Args -->
<arg name="basepath" value="."/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="80"/>
<arg value="p"/>
<arg value="s"/>
<!-- Paths to check -->
<file>includes</file>
<file>leadcapture-form.php</file>
<rule ref="SilverAssistWP">
<!-- Allow PSR-4 file naming -->
<exclude name="WordPress.Files.FileName"/>
<!-- SilverAssist namespace (not plugin prefix) -->
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound"/>
<!-- Allow short ternaries (modern PHP) -->
<exclude name="Universal.Operators.DisallowShortTernary"/>
<!-- Allow non-Yoda conditions (modern PHP) -->
<exclude name="WordPress.PHP.YodaConditions"/>
<!-- Allow development functions in test helpers -->
<exclude name="WordPress.PHP.DevelopmentFunctions"/>
<!-- Allow eval in test helpers (for dynamic assertions) -->
<exclude name="Squiz.PHP.Eval"/>
<!-- Allow init function alongside class in main plugin file -->
<exclude name="Universal.Files.SeparateFunctionsFromOO"/>
</rule>
<!-- Minimum WordPress version -->
<config name="minimum_wp_version" value="6.5"/>
<!-- Prefix for global functions/variables -->
<config name="prefixes" value="leadcapture"/>
<!-- Text domain validation -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="leadcapture-form"/>
</property>
</properties>
</rule>
<!-- Exclude patterns -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>*.min.*</exclude-pattern>
<exclude-pattern>languages/*</exclude-pattern>
<exclude-pattern>.phpcs-cache/*</exclude-pattern>
</ruleset>