-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
110 lines (88 loc) · 3.7 KB
/
Copy pathphpcs.xml
File metadata and controls
110 lines (88 loc) · 3.7 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="WordPress Plugin Coding Standards">
<description>WordPress coding standards</description>
<!-- Files to check -->
<file>.</file>
<!-- Exclude patterns -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/.private/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/.git/*</exclude-pattern>
<exclude-pattern>*/.github/*</exclude-pattern>
<exclude-pattern>*/build/*</exclude-pattern>
<exclude-pattern>*/dist/*</exclude-pattern>
<exclude-pattern>*/css/*</exclude-pattern>
<exclude-pattern>*/js/*</exclude-pattern>
<exclude-pattern>*/stubs/*</exclude-pattern>
<exclude-pattern>*.css</exclude-pattern>
<exclude-pattern>*.js</exclude-pattern>
<!-- Use WordPress-Extra coding standards (includes WordPress-Core) -->
<rule ref="WordPress-Extra">
<!-- Allow short array syntax [] instead of array() -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<!-- Allow longer lines for readability -->
<exclude name="Generic.Files.LineLength"/>
</rule>
<!-- WordPress documentation standards -->
<rule ref="WordPress-Docs"/>
<!-- Additional WordPress-specific spacing rules -->
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing"/>
<rule ref="WordPress.WhiteSpace.OperatorSpacing"/>
<!-- Enforce WordPress indentation standards -->
<rule ref="WordPress.Arrays.ArrayIndentation"/>
<rule ref="WordPress.Arrays.MultipleStatementAlignment"/>
<!-- WordPress function call formatting -->
<rule ref="PEAR.Functions.FunctionCallSignature">
<properties>
<property name="allowMultipleArguments" value="false"/>
</properties>
</rule>
<!-- WordPress class and method formatting -->
<rule ref="PSR2.Classes.ClassDeclaration"/>
<rule ref="PSR2.Methods.MethodDeclaration"/>
<!-- File formatting -->
<rule ref="Generic.Files.ByteOrderMark"/>
<rule ref="Generic.Files.LineEndings">
<properties>
<property name="eolChar" value="\n"/>
</properties>
</rule>
<!-- WordPress security and best practices -->
<rule ref="WordPress.Security"/>
<!-- WordPress internationalization configuration -->
<rule ref="WordPress.WP.I18n">
<properties>
<!-- Set the text domain for internationalization -->
<property name="text_domain" type="array">
<element value="optimizations-ace-mc"/>
</property>
</properties>
</rule>
<!-- WordPress naming conventions (snake_case) -->
<rule ref="WordPress.NamingConventions.ValidFunctionName"/>
<rule ref="WordPress.NamingConventions.ValidVariableName"/>
<rule ref="WordPress.NamingConventions.ValidHookName"/>
<!-- WordPress PHP compatibility -->
<rule ref="PHPCompatibilityWP">
<include-pattern>*\.php$</include-pattern>
</rule>
<!-- PHPCSExtra standards for additional code quality checks -->
<rule ref="Modernize"/>
<!-- Allow PHP short array syntax. -->
<rule ref="Universal.Arrays.DisallowShortArraySyntax">
<severity>0</severity>
</rule>
<rule ref="NormalizedArrays">
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
</rule>
<!-- Set minimum WordPress version for deprecated function checks -->
<config name="minimum_wp_version" value="7.0"/>
<config name="testVersion" value="8.2-"/>
<!-- Show progress -->
<arg value="p"/>
<!-- Show sniff codes in all reports -->
<arg value="s"/>
<!-- Use colors in output -->
<arg name="colors"/>
</ruleset>