forked from alleyinteractive/apple-news
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml.dist
125 lines (112 loc) · 4.06 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?xml version="1.0"?>
<ruleset name="publish-to-apple-news">
<description>Sniffs for the coding standards of the Publish to Apple News plugin.</description>
<!--
Pass some flags to PHPCS:
p flag: Show progress of the run.
s flag: Show sniff codes in all reports.
-->
<arg value="ps" />
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./" />
<!-- Check only 1 file simultaneously. -->
<arg name="parallel" value="1" />
<!-- Only check JS and PHP files. -->
<arg name="extensions" value="js,php" />
<!-- Set severity to 1 to see everything that isn't effectively turned off. -->
<arg name="severity" value="1" />
<!-- Check all files in this directory and the directories below it. -->
<file>.</file>
<!-- Exclude a few directories and autogenerated files. -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*.min.js</exclude-pattern>
<exclude-pattern>bin/</exclude-pattern>
<exclude-pattern>build/</exclude-pattern>
<exclude-pattern>tests/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<rule ref="WordPress">
<exclude-pattern>assets/</exclude-pattern>
</rule>
<rule ref="WordPress-VIP-Go" />
<rule ref="WordPress.WP.I18n">
<properties>
<!--
Verify that the text_domain is set to the desired text-domain.
Multiple valid text domains can be provided as a comma-delimited list.
-->
<property name="text_domain" type="array" value="apple-news" />
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array" value="apple_,Apple_,Admin_Apple_" />
</properties>
</rule>
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<!--
WordPress.com VIP does not propagate wp_cache_set data across datacenters,
largely to avoid attempting to propagate large (>50k) data for batcache.
-->
<property name="forbiddenFunctions" type="array">
<element key="wp_cache_add" value="wp_cache_set"/>
</property>
</properties>
</rule>
<!-- Turn off a few newly added or renamed rules until we put fixes in place. -->
<!-- We will target version 2.0.0 for these fixes. -->
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod.Found">
<severity>0</severity>
</rule>
<rule ref="WordPress.DB.SlowDBQuery.slow_db_query_meta_query">
<severity>0</severity>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound">
<severity>0</severity>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound">
<severity>0</severity>
</rule>
<rule ref="WordPress.Security.NonceVerification.NoNonceVerification">
<severity>0</severity>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride.OverrideProhibited">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Files.IncludingFile.UsingVariable">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Functions.RestrictedFunctions.wp_mail_wp_mail">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.JS.HTMLExecutingFunctions.append">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.JS.HTMLExecutingFunctions.html">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.JS.StringConcat.Found">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsUnknown">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Security.ExitAfterRedirect.NoExit">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.SelfOutsideClass">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.UndefinedVariable">
<severity>0</severity>
</rule>
<rule ref="WordPressVIPMinimum.Variables.VariableAnalysis.UnusedVariable">
<severity>0</severity>
</rule>
</ruleset>