-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
69 lines (62 loc) · 2.93 KB
/
phpcs.xml.dist
File metadata and controls
69 lines (62 loc) · 2.93 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
<?xml version="1.0"?>
<ruleset name="CartPinger">
<description>CartPinger Coding Standards</description>
<file>./src</file>
<file>./cartpinger.php</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/assets/build/*</exclude-pattern>
<arg name="extensions" value="php"/>
<arg name="colors"/>
<arg value="ps"/>
<config name="testVersion" value="8.2-"/>
<config name="minimum_wp_version" value="6.5"/>
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<!-- OO plugins use camelCase for class methods; this rule targets procedural code -->
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
<!-- PHP exceptions are not HTML output; escaping is irrelevant -->
<exclude name="WordPress.Security.EscapeOutput.ExceptionNotEscaped"/>
<!-- Complex generic types (array<K,V>) break automatic spacing alignment -->
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType"/>
<!-- Private properties and constructors in OO code need no separate @var docblock -->
<exclude name="Squiz.Commenting.VariableComment.Missing"/>
<exclude name="Squiz.Commenting.FunctionComment.Missing"/>
</rule>
<rule ref="WordPress-Extra">
<!-- Stub methods legitimately have unused parameters -->
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<!-- TODO comments intentionally omit trailing punctuation -->
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
<!-- Multi-line inline comment continuations are acceptable -->
<exclude name="Squiz.Commenting.InlineComment.SpacingBefore"/>
<!-- Caching will be added in v1.0; all direct queries are intentional stubs -->
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching"/>
</rule>
<!-- manage_woocommerce is registered by WooCommerce (required plugin) -->
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="manage_woocommerce"/>
</property>
</properties>
</rule>
<rule ref="PHPCompatibilityWP"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="cartpinger-for-woocommerce"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="cartpinger"/>
<element value="CartPinger"/>
</property>
</properties>
</rule>
</ruleset>