-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
53 lines (45 loc) · 2.1 KB
/
phpcs.xml.dist
File metadata and controls
53 lines (45 loc) · 2.1 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
<?xml version="1.0"?>
<ruleset name="PHP Coding Standards">
<arg name="extensions" value="php" />
<arg name="colors" />
<arg name="parallel" value="16" />
<arg value="s" /><!-- Show sniff codes in all reports. -->
<arg value="p" /><!-- Show progress. -->
<!-- Ensure all code works with PHP 8.3 and above. -->
<rule ref="PHPCompatibilityWP" />
<config name="testVersion" value="8.3-" />
<!--
Prevent errors caused by WordPress Coding Standards not supporting PHP 8.0+.
See https://github.com/WordPress/WordPress-Coding-Standards/issues/2035
-->
<ini name="error_reporting" value="E_ALL & ~E_DEPRECATED" />
<rule ref="WordPress-VIP-Go" />
<rule ref="WordPress" />
<rule ref="WordPress-Core">
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" /><!-- We enforce short syntax further down. -->
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore" />
<exclude name="Universal.CodeAnalysis.ConstructorDestructorReturn.ReturnValueFound" />
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed" /><!-- Expected for filters and hooks. -->
<exclude name="Universal.Operators.DisallowShortTernary.Found" />
</rule>
<!-- Enforce short array syntax -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found">
<type>warning</type>
</rule>
<file>client-mu-plugins</file>
<file>local/public</file>
<file>plugins</file>
<file>themes</file>
<file>vip-config</file>
<exclude-pattern>local/public/wp-content</exclude-pattern>
<exclude-pattern>themes/twentytwenty</exclude-pattern>
<exclude-pattern>themes/example-theme/</exclude-pattern><!-- Uses own ruleset. -->
<exclude-pattern>local/public/wp</exclude-pattern>
<exclude-pattern>plugins/action-scheduler</exclude-pattern>
<exclude-pattern>plugins/safe-svg</exclude-pattern>
<exclude-pattern>plugins/vendor</exclude-pattern>
<exclude-pattern>plugins/wp-crontrol</exclude-pattern>
<exclude-pattern>plugins/wpcom-legacy-redirector</exclude-pattern>
<exclude-pattern>plugins/example-*/build</exclude-pattern><!-- Uses own ruleset. -->
</ruleset>