-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathphpcs.xml
60 lines (50 loc) · 2.23 KB
/
phpcs.xml
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
<?xml version="1.0"?>
<ruleset name="PHPTypographyStandard">
<description>
A custom set of code standard rules to check for the PHP-Tyography library (based on WordPress coding standards):
* See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
* See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml
</description>
<config name="testVersion" value="7.4-"/>
<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
<exclude name="WordPress.Security.EscapeOutput" />
<exclude name="WordPress.WP.AlternativeFunctions" />
<exclude name="WordPress.Arrays.CommaAfterArrayItem.SpaceAfterComma" />
<exclude name="Generic.Functions.FunctionCallArgumentSpacing" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.stringFound" />
</rule>
<!-- Include WordPress-Extra ruleset -->
<rule ref="WordPress-Extra"></rule>
<rule ref="WordPress.NamingConventions.ValidVariableName">
<properties>
<property name="allowed_custom_properties" type="array" value="nodeValue,parentNode,childNodes,tagName,ownerDocument,nextSibling,previousSibling,firstChild,lastChild" />
</properties>
</rule>
<rule ref="Squiz.PHP.CommentedOutCode">
<properties>
<property name="maxPercentage" value="60" />
</properties>
</rule>
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
<properties>
<property name="exact" value="false" />
<property name="maxColumn" value="70" />
</properties>
</rule>
<!-- Less strict rules for tests -->
<rule ref="WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting">
<exclude-pattern>*/tests/*\.php</exclude-pattern>
</rule>
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_error_reporting">
<exclude-pattern>*/tests/*\.php</exclude-pattern>
</rule>
<rule ref="Universal.WhiteSpace.CommaSpacing.TooMuchSpaceAfter">
<exclude-pattern>*/tests/*\.php</exclude-pattern>
</rule>
<!-- Include sniffs for PHP cross-version compatibility, but not for tests-->
<rule ref="PHPCompatibility">
<exclude-pattern>*/tests/*\.php</exclude-pattern>
</rule>
</ruleset>