-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
70 lines (56 loc) · 2.34 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
<?xml version="1.0"?>
<ruleset name="WPLoginPage">
<description>Coding Standards for plugin</description>
<!-- Scan all files in directory -->
<file>.</file>
<!-- Scan only PHP files -->
<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>
<!-- Ignore Composer dependencies -->
<exclude-pattern>bin/</exclude-pattern>
<exclude-pattern>build/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>
<exclude-pattern>src/</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.Found"/>
<!-- 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"/>
<!-- Allow to use not SnakeCase values. -->
<exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase"/>
</rule>
<config name="minimum_supported_wp_version" value="4.7"/>
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="5.6-"/>
<rule ref="WordPress.WP.I18n">
<properties>
<!-- Value: replace the text domain used. -->
<property name="text_domain" type="array" value="wp-login-page"/>
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
<properties>
<property name="blank_line_check" value="true"/>
</properties>
</rule>
</ruleset>