-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
64 lines (52 loc) · 1.79 KB
/
phpcs.xml
File metadata and controls
64 lines (52 loc) · 1.79 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
<?xml version="1.0"?>
<ruleset name="Webtions Plugin Standards">
<description>Apply WordPress Coding Standards to all PHP files in Webtions plugins.</description>
<!-- Only scan PHP files -->
<arg name="extensions" value="php"/>
<!-- Use cache to improve performance -->
<arg name="cache"/>
<!-- Set memory limit -->
<ini name="memory_limit" value="512M"/>
<!-- Show relative file paths -->
<arg name="basepath" value="./"/>
<!-- Show sniff codes in reports -->
<arg value="ps"/>
<!-- Run up to 20 files in parallel -->
<arg name="parallel" value="20"/>
<!-- Scan the current plugin directory -->
<file>.</file>
<!-- Prevent blank line after <?php -->
<rule ref="PSR2.Files.ClosingTag">
<exclude-pattern>*</exclude-pattern>
</rule>
<!-- Apply WordPress ruleset (Core + Docs + Extra) -->
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra"/>
<!-- Downgrade strict rules to warnings -->
<rule ref="WordPress.PHP.YodaConditions.NotYoda">
<type>warning</type>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase">
<type>warning</type>
</rule>
<rule ref="WordPress.DB.PreparedSQL.InterpolatedNotPrepared">
<type>warning</type>
</rule>
<rule ref="WordPress.DB.PreparedSQL.NotPrepared">
<type>warning</type>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<type>warning</type>
</rule>
<!-- Exclude third-party and non-source folders -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>build/*</exclude-pattern>
<exclude-pattern>assets/*</exclude-pattern>
<exclude-pattern>styles/*</exclude-pattern>
<!-- Skip file naming rule -->
<rule ref="WordPress.Files.FileName">
<exclude-pattern>*</exclude-pattern>
</rule>
</ruleset>