forked from google/site-kit-wp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
77 lines (66 loc) · 2.33 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0"?>
<ruleset name="Site Kit by Google Project Rules">
<rule ref="WordPress-VIP-Go" />
<rule ref="WordPress-Core">
<exclude name="WordPress.PHP.DisallowShortTernary" />
<!-- Prevent this from showing up as a warning on every run. See WordPress/WordPress-Coding-Standards#1425 -->
<exclude name="WordPress.WP.TimezoneChange.DeprecatedSniff"/>
</rule>
<rule ref="WordPress-Docs">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress-Extra">
<!-- Forget about file names -->
<exclude name="WordPress.Files.FileName"/>
</rule>
<!-- Use correct textdomain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" value="google-site-kit" />
</properties>
</rule>
<!-- Show details about violated sniffs -->
<arg value="s"/>
<!-- Iterate over all PHP files by default -->
<arg name="extensions" value="php"/>
<file>.</file>
<!-- Rule specific exclusions -->
<rule ref="WordPress.DB.DirectDatabaseQuery">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.DB.SlowDBQuery">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.NonceVerification">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPressVIPMinimum.Functions.RestrictedFunctions">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPressVIPMinimum.Variables.RestrictedVariables">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<!-- Third-party code -->
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>third-party/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Check for cross-version support for PHP 5.6 and higher. -->
<config name="testVersion" value="5.6-"/>
<config name="minimum_supported_wp_version" value="4.7"/>
<rule ref="PHPCompatibilityWP" />
</ruleset>