forked from Yoast/wordpress-seo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codesniffer.xml
28 lines (23 loc) · 1.35 KB
/
codesniffer.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
<?xml version="1.0"?>
<ruleset name="WordPress SEO">
<description>WordPress SEO rules for PHP_CodeSniffer</description>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>admin/license-manager/*</exclude-pattern>
<rule ref="WordPress-VIP">
<exclude name="Generic.Files.LineEndings.InvalidEOLChar" />
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
<!-- WP VIP rules which are very restrictive and not all that applicable as WPSEO is not on VIP -->
<exclude name="WordPress.VIP.DirectDatabaseQuery" />
<exclude name="WordPress.VIP.FileSystemWritesDisallow"/>
<exclude name="WordPress.VIP.RestrictedFunctions.user_meta" />
<exclude name="WordPress.VIP.RestrictedVariables.user_meta"/>
<exclude name="WordPress.VIP.RestrictedFunctions.switch_to_blog"/>
<!-- We should probably want to turn the below rules on, but these give issues with the current code base. -->
<exclude name="WordPress.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="WordPress.XSS.EscapeOutput" /><!-- This sniff also has known & reported bugs -->
<exclude name="WordPress.VIP.PostsPerPage.posts_per_page"/>
<!-- Turned off because of known & reported bugs in the Sniffs, should be turned on once the bugs are fixed. -->
<exclude name="WordPress.VIP.ValidatedSanitizedInput"/>
</rule>
<rule ref="WordPress.PHP.DiscouragedFunctions"/>
</ruleset>