-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpcs.xml
More file actions
97 lines (78 loc) · 3.01 KB
/
phpcs.xml
File metadata and controls
97 lines (78 loc) · 3.01 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
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
<?xml version="1.0"?>
<ruleset name="WP HTTP BLOCKLIST">
<description>Coding Standards for plugin</description>
<!-- Scan all files in directory -->
<file>.</file>
<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>
<!-- Ignore Composer dependencies -->
<exclude-pattern>languages/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>tests/</exclude-pattern>
<!-- Show colors in console -->
<arg value="-colors"/>
<!-- Show sniff codes in all reports -->
<arg value="ns"/>
<!-- Show progress. -->
<arg value="p"/>
<!-- Set ini. -->
<ini name="memory_limit" value="512M"/>
<ini name="max_execution_time" value="-1"/>
<!-- Use WordPress Extra as a base -->
<rule ref="WordPress-Extra">
<!-- Exclude as we use a custom autoloader. -->
<exclude name="WordPress.Files.FileName"/>
<!-- Exclude as it conflict with @var declaration. -->
<exclude name="Squiz.PHP.CommentedOutCode"/>
<!-- Exclude as we use custom naming for our class. -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<!-- Exclude as we use the short array syntax over the long one. -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
<!-- Allow to use short ternary operators since they are very useful. -->
<exclude name="WordPress.PHP.DisallowShortTernary.Found"/>
<exclude name="Universal.Operators.DisallowShortTernary.Found"/>
</rule>
<!-- Force short array syntax on global ruleset -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<config name="minimum_supported_wp_version" value="5.4"/>
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="5.6-"/>
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<properties>
<property name="customSanitizingFunctions" type="array">
<element value="wc_clean"/>
<element value="wc_sanitize_tooltip"/>
<element value="wc_format_decimal"/>
<element value="wc_stock_amount"/>
<element value="wc_sanitize_permalink"/>
<element value="wc_sanitize_textarea"/>
</property>
</properties>
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customEscapingFunctions" type="array">
<element value="wc_help_tip"/>
<element value="wc_sanitize_tooltip"/>
<element value="wc_selected"/>
<element value="wc_kses_notice"/>
<element value="wc_esc_json"/>
<element value="wc_query_string_form_fields"/>
<element value="wc_make_phone_clickable"/>
</property>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="wp-http-blocklist"/>
</property>
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
<properties>
<property name="blank_line_check" value="true"/>
</properties>
</rule>
</ruleset>