-
Notifications
You must be signed in to change notification settings - Fork 18
/
phpcs.xml.dist
66 lines (52 loc) · 2.33 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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="Beapi frontend framework"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>A custom set of rules to check for a WPized WordPress project</description>
<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>
<!-- Scan all files in directory -->
<file>.</file>
<!-- Exclude the Composer Vendor directory. -->
<exclude-pattern>src/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>dist/</exclude-pattern>
<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.Found"/>
<!-- Exclude as we use the short array syntax over the long one. -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<!-- Allow to use short ternary operators since they are very usefull. -->
<exclude name="WordPress.PHP.DisallowShortTernary.Found"/>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<!-- Show sniff name in report. -->
<arg value="sp"/>
<!-- Show progress. -->
<arg value="p"/>
<!-- Use colors. -->
<arg name="colors"/>
<!-- Set ini. -->
<ini name="memory_limit" value="512M"/>
<ini name="max_execution_time" value="-1"/>
<rule ref="PHPCompatibility"/>
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customAutoEscapedFunctions" type="array">
<element value="bea_get_attachment_image" />
<element value="get_the_icon"/>
<element value="get_the_image"/>
<element value="get_the_image"/>
<element value="get_the_link"/>
<element value="get_acf_link"/>
<element value="get_share_link"/>
<element value="get_the_text"/>
<element value="get_terms_list"/>
<element value="get_languages_list"/>
<element value="get_languages_list_selector"/>
</property>
</properties>
</rule>
</ruleset>