-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
59 lines (51 loc) · 2.04 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
59 lines (51 loc) · 2.04 KB
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
<?xml version="1.0"?>
<ruleset name="Owlstack">
<description>Owlstack WP coding standard: WordPress security, I18n, DB, and PHP sniffs on a PSR-style codebase.</description>
<file>src</file>
<file>owlstack.php</file>
<file>uninstall.php</file>
<arg name="extensions" value="php"/>
<arg value="sp"/>
<!-- Security: escaping, nonces, input sanitization, safe redirects. -->
<rule ref="WordPress.Security"/>
<!-- WordPress API usage: I18n, deprecated/alternative/discouraged functions, enqueues, capabilities. -->
<rule ref="WordPress.WP"/>
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="manage_owlstack"/>
<element value="owlstack_publish"/>
<element value="owlstack_view_logs"/>
</property>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="owlstack"/>
</property>
</properties>
</rule>
<!-- Database access. -->
<rule ref="WordPress.DB"/>
<!-- PHP pitfalls (silenced errors, extract, dev functions, strict in_array, ...). -->
<rule ref="WordPress.PHP">
<!-- The codebase intentionally does not use Yoda conditions. -->
<exclude name="WordPress.PHP.YodaConditions"/>
<!-- Deprecated in WordPressCS 3.3, removed in 4.0. -->
<exclude name="WordPress.PHP.POSIXFunctions"/>
</rule>
<!-- Global namespace hygiene. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="owlstack"/>
<element value="Owlstack"/>
<element value="OWLSTACK"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.ValidHookName"/>
<!-- Parseable PHP. -->
<rule ref="Generic.PHP.Syntax"/>
</ruleset>