-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
73 lines (56 loc) · 2.29 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
<?xml version="1.0"?>
<ruleset name="ContentSyncFusion">
<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"/>
</rule>
<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" value="wc_clean,wc_sanitize_tooltip,wc_format_decimal,wc_stock_amount,wc_sanitize_permalink,wc_sanitize_textarea" />
</properties>
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customEscapingFunctions" type="array" value="wc_help_tip,wc_sanitize_tooltip,wc_selected,wc_kses_notice,wc_esc_json,wc_query_string_form_fields,wc_make_phone_clickable" />
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<!-- Value: replace the text domain used. -->
<property name="text_domain" type="array" value="wp-http-blocklist"/>
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
<properties>
<property name="blank_line_check" value="true"/>
</properties>
</rule>
</ruleset>