-
Notifications
You must be signed in to change notification settings - Fork 112
/
phpcs.xml.dist
76 lines (60 loc) · 2.38 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for OAuth1">
<description>Sniffs for WordPress plugins, with minor modifications for OAuth1</description>
<config name="minimum_supported_wp_version" value="4.4" />
<!-- Check for cross-version support for PHP 5.4 and higher. -->
<config name="testVersion" value="5.4-"/>
<rule ref="PHPCompatibilityWP">
<include-pattern>*\.php$</include-pattern>
</rule>
<rule ref="WordPress-Core"/>
<rule ref="WordPress-VIP-Go"/>
<rule ref="WordPress.DB.SlowDBQuery">
<exclude-pattern>lib/class-wp-rest-oauth1-listtable.php</exclude-pattern>
<exclude-pattern>lib/class-wp-rest-client.php</exclude-pattern>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<exclude-pattern>*.php</exclude-pattern>
<exclude-pattern>lib/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.NonceVerification">
<exclude-pattern>*.php</exclude-pattern>
<exclude-pattern>lib/*</exclude-pattern>
</rule>
<rule ref="WordPressVIPMinimum.Classes.RestrictedExtendClasses.wp_cli">
<exclude-pattern>lib/class-wp-rest-oauth1-cli.php</exclude-pattern>
</rule>
<rule ref="WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules">
<exclude-pattern>oauth-server.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited">
<exclude-pattern>oauth-server.php</exclude-pattern>
<exclude-pattern>lib/class-wp-rest-oauth1-admin.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="rest_oauth1"/>
</property>
</properties>
</rule>
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis">
<properties>
<property name="allowUnusedParametersBeforeUsed" value="true"/>
</properties>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature">
<properties>
<property name="allowMultipleArguments" value="false"/>
</properties>
</rule>
<arg value="ps"/>
<arg name="extensions" value="php"/>
<file>.</file>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./" />
<!-- Check up to 20 files simultaneously. -->
<arg name="parallel" value="20" />
<!-- Exclude third party libraries -->
<exclude-pattern>./vendor/*</exclude-pattern>
</ruleset>