-
-
Notifications
You must be signed in to change notification settings - Fork 49
/
phpcs.xml.dist
60 lines (50 loc) · 1.95 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0"?>
<ruleset name="User Switching">
<arg name="cache" value="tests/cache/phpcs.json"/>
<config name="minimum_wp_version" value="5.9"/>
<config name="testVersion" value="7.4-"/>
<exclude-pattern>/.wordpress-org/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<rule ref="PHPCompatibility"/>
<rule ref="WordPress-Extra">
<!-- Skip checks for naming and indentation: -->
<exclude name="WordPress.Files.FileName" />
<exclude name="PEAR.NamingConventions.ValidClassName" />
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed" />
<!-- These are all false positives: -->
<exclude name="WordPress.Security.NonceVerification.Recommended" />
<!-- Sanity: -->
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
</rule>
<rule ref="WordPress-Docs" />
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customAutoEscapedFunctions" type="array">
<element value="bp_get_button"/>
</property>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="user-switching"/>
</property>
</properties>
</rule>
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="switch_to_user"/>
<element value="switch_off"/>
</property>
</properties>
</rule>
</ruleset>