forked from Yoast/wordpress-seo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruleset.xml
37 lines (29 loc) · 1.65 KB
/
ruleset.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
<?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>
<exclude-pattern>*</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"/>
<!-- Demanding Yoda conditions is stupid. -->
<exclude name="WordPress.PHP.YodaConditions"/>
<!-- Temporarily disable this check until it's fixed -->
<exclude name="WordPress.Functions.FunctionCallSignature"/>
<!-- Turned off because of known & reported bugs in the Sniffs, should be turned on once the bugs are fixed. -->
<exclude name="WordPress.VIP.ValidatedSanitizedInput"/>
<exclude name="WordPress.PHP.YodaConditions"/>
</rule>
<rule ref="WordPress.PHP.DiscouragedFunctions"/>
</ruleset>