-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphpcs.xml.dist
46 lines (39 loc) · 1.59 KB
/
phpcs.xml.dist
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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<arg name="extensions" value="php" />
<arg name="colors" />
<arg name="parallel" value="16" />
<arg value="sp" />
<!-- Lint all PHP files in this directory by default. -->
<file>.</file>
<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. -->
</rule>
<!-- Enforce short array syntax -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found">
<type>warning</type>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="basic-composer" />
</property>
</properties>
</rule>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/build/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/tests/wordpress/*</exclude-pattern>
<exclude-pattern>*/phpstan/*</exclude-pattern>
<exclude-pattern>*/languages/*</exclude-pattern>
<!--
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" />
</ruleset>