forked from auth0/wordpress
-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml.dist
67 lines (54 loc) · 2.33 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
<?xml version="1.0"?>
<ruleset name="WP-Auth0" namespace="WPAuth0\CS\Standard">
<description>A custom coding standard for WP-Auth0</description>
<file>.</file>
<!-- Internal tool, will be removed-->
<exclude-pattern>/account_cleanup/*</exclude-pattern>
<!-- Not currently checking JS or CSS -->
<exclude-pattern>/assets/*</exclude-pattern>
<!-- Tests have their own ruleset (different PHP version) -->
<exclude-pattern>/tests/*</exclude-pattern>
<!-- Dev tools only, currently -->
<exclude-pattern>/vendor/*</exclude-pattern>
<!-- Not currently checking JS -->
<exclude-pattern>/webtask/*</exclude-pattern>
<!-- Deprecated so no changes needed -->
<exclude-pattern>/lib/admin/WP_Auth0_Admin_Dashboard.php</exclude-pattern>
<exclude-pattern>/lib/dashboard-widgets/*</exclude-pattern>
<!-- Only check PHP files. -->
<arg name="extensions" value="php"/>
<!-- Show progress, show the error codes for each message (source). -->
<arg value="sp"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="."/>
<!-- Show coloured output, if available. -->
<arg name="colors"/>
<!--
PHPCompatibility sniffs to check for PHP cross-version incompatible code.
https://github.com/PHPCompatibility/PHPCompatibility
-->
<config name="testVersion" value="5.3-"/>
<config name="minimum_supported_wp_version" value="3.8"/>
<rule ref="PHPCompatibilityWP"/>
<rule ref="Generic.CodeAnalysis"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="PHPCompatibility"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Core">
<exclude name="WordPress.Files.FileName"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar"/>
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
</rule>
<rule ref="WordPress.DB.DirectDatabaseQuery"/>
<rule ref="WordPress.DB.SlowDBQuery"/>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array" value="wp_auth0" />
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="wp-auth0" />
</properties>
</rule>
</ruleset>