-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
88 lines (68 loc) · 2.68 KB
/
Copy pathphpcs.xml
File metadata and controls
88 lines (68 loc) · 2.68 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
77
78
79
80
81
82
83
84
85
86
87
88
<?xml version="1.0"?>
<ruleset name="EventLayer">
<description>EventLayer WordPress Plugin Coding Standards</description>
<!-- Check all PHP files in src/ -->
<file>./src/</file>
<file>./eventlayer.php</file>
<!-- Show sniff codes in all reports -->
<arg value="ps"/>
<!-- Use colors in output -->
<arg name="colors"/>
<!-- Show progress while running -->
<arg value="p"/>
<!-- Parallel processing -->
<arg name="parallel" value="8"/>
<!-- Cache results -->
<arg name="cache" value=".phpcs.cache"/>
<!-- Extensions to check -->
<arg name="extensions" value="php"/>
<!-- Ignore vendor directory -->
<exclude-pattern>./vendor/</exclude-pattern>
<exclude-pattern>./node_modules/</exclude-pattern>
<!-- Include WordPress Coding Standards -->
<rule ref="WordPress">
<!-- Allow short array syntax -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<!-- Allow closures without explicit scope -->
<exclude name="Squiz.Scope.MethodScope.Missing"/>
<!-- Allow file names with classes -->
<exclude name="WordPress.Files.FileName"/>
<!-- Allow direct output in templates -->
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/>
</rule>
<!-- Include WordPress Extra rules -->
<rule ref="WordPress-Extra">
<!-- Allow short array syntax -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>
<!-- Check for PHP compatibility -->
<rule ref="PHPCompatibilityWP"/>
<!-- Set minimum PHP version -->
<config name="testVersion" value="8.1-"/>
<!-- Allow WordPress functions -->
<rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited">
<exclude-pattern>*</exclude-pattern>
</rule>
<!-- Relaxed nonce verification for admin pages -->
<rule ref="WordPress.Security.NonceVerification.Missing">
<exclude-pattern>./src/Admin/Views/*</exclude-pattern>
</rule>
<!-- Allow direct database calls for our repository pattern -->
<rule ref="WordPress.DB.DirectDatabaseQuery.DirectQuery">
<exclude-pattern>./src/Data/*</exclude-pattern>
</rule>
<!-- Custom line length -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="150"/>
</properties>
</rule>
<!-- Custom indentation -->
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="true"/>
</properties>
</rule>
</ruleset>