forked from Yoast/wordpress-seo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
44 lines (36 loc) · 1.63 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
<?xml version="1.0"?>
<ruleset name="Yoast SEO">
<description>Yoast SEO rules for PHP_CodeSniffer</description>
<file>.</file>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>deprecated/*</exclude-pattern>
<exclude-pattern>languages/*</exclude-pattern>
<exclude-pattern>artifact/*</exclude-pattern>
<exclude-pattern>.wordpress-svn/*</exclude-pattern>
<arg name="extensions" value="php"/>
<arg value="sp"/>
<rule ref="Yoast">
<exclude name="WordPress.WP.PreparedSQL.NotPrepared"/><!-- TODO audit raw queries -->
<exclude name="WordPress.Functions.DontExtract" /><!-- TODO audit usage & replace -->
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" value="wordpress-seo" />
</properties>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName">
<properties>
<property name="customVariablesWhitelist" type="array" value="pageUrl,responseCode,siteEntry,siteUrl,countPerTypes,urlCrawlErrorSample,buyUrl,infoUrl" />
</properties>
</rule>
<!-- TEMPORARY exclusion! This has to do with a bug in WPCS 0.10.0. The bug has been fixed in WPCS 0.11.0. -->
<rule ref="WordPress.WP.I18n.UnorderedPlaceholders">
<exclude-pattern>inc/class-wpseo-replace-vars.php</exclude-pattern>
</rule>
<!-- TEMPORARY exclusion! Because we're not on 0.5 yet -->
<rule ref="WordPress.VIP.RestrictedFunctions">
<exclude-pattern>inc/class-wpseo-image-utils.php</exclude-pattern>
</rule>
</ruleset>