-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
61 lines (44 loc) · 2.21 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
61 lines (44 loc) · 2.21 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
<?xml version="1.0"?>
<ruleset name="WP PHPCS - Rules">
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<description>The custom ruleset for the WP PHPCS itself.</description>
<!-- Show file path based on project root. -->
<arg name="basepath" value="." />
<arg name="extensions" value="php/PHP" />
<!-- Show sniff codes in all reports, and progress when running. -->
<arg value="sp" />
<!-- @see https://github.com/PHPCompatibility/PHPCompatibility#using-a-custom-ruleset -->
<config name="testVersion" value="7.4-" />
<!-- @see https://github.com/PHPCompatibility/PHPCompatibilityWP#how-to-use -->
<rule ref="PHPCompatibilityWP">
<exclude name="PHPCompatibility.Constants.NewConstants" />
</rule>
<!-- Include when not specified -->
<file>./src</file>
<exclude-pattern>dev/*</exclude-pattern>
<rule ref="Universal.Classes.DisallowFinalClass">
<type>error</type>
</rule>
<config name="minimum_wp_version" value="6.4" />
<rule ref="WordPress-Extra">
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
<exclude name="Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement" />
<!-- Shells out to `php -l` per file (by far the most expensive sniff). Syntax is already caught by the runtime, IDE, CI, and the pre-commit lint hook. -->
<exclude name="Generic.PHP.Syntax" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="WordPress.Files.FileName" />
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid" />
<exclude name="WordPress.NamingConventions.ValidVariableName" />
</rule>
<rule ref="WordPress-Docs" />
<!-- Enforce PSR1 compatible namespaces. -->
<rule ref="PSR1.Classes.ClassDeclaration" />
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
<properties>
<property name="alignMultilineItems" value="!=100" />
</properties>
</rule>
<rule ref="PSR2.Methods.FunctionClosingBrace" />
<!-- Disallow long array syntax. -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
</ruleset>