forked from akirk/friends
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
77 lines (69 loc) · 2.84 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
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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>
<config name="text_domain" value="friends" />
<rule ref="WordPress">
<properties>
<property name="custom_capabilities[]" value="friend,acquaintance,friend_request,pending_friend_request,subscription,friends_plugin"/>
</properties>
</rule>
<rule ref="WordPress-Core">
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict" />
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
<exclude name="Squiz.Commenting.VariableComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
</rule>
<rule ref="WordPress-Docs" />
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<!-- Some common functions that might technically require output escaping, but rarely cause anything but false positives -->
<property name="customAutoEscapedFunctions" type="array">
<element value="__" />
<element value="_e" />
<element value="_x" />
<element value="wp_create_nonce" />
<element value="plugin_dir_url" />
<element value="plugins_url" />
<element value="admin_url" />
<element value="sanitize_text_field" />
<element value="sanitize_textarea_field" />
<element value="get_locale" />
<element value="get_bloginfo" /> <!-- only safe if 'display' filter is used -->
<element value="validate_feed_catch_all" />
<element value="validate_feed_rules" />
</property>
</properties>
<type>warning</type>
<exclude-pattern>tests/bootstrap.php</exclude-pattern>
<exclude-pattern>*/widgets/*</exclude-pattern>
<exclude-pattern>*/templates/email/*.text.php</exclude-pattern>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<properties>
<property name="customSanitizingFunctions" type="array">
<element value="validate_feed_catch_all" />
<element value="validate_feed_rules" />
<element value="check_url" />
</property>
</properties>
</rule>
<rule ref="WordPress.Security.EscapeOutput.UnsafePrintingFunction">
<type>warning</type>
</rule>
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<file>.</file>
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/bin/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/libs/*</exclude-pattern>
<exclude-pattern>blocks/*/build/index.asset.php</exclude-pattern>
</ruleset>