Repository navigation
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
104 lines (95 loc) · 3.91 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
104 lines (95 loc) · 3.91 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
98
99
100
101
102
103
104
<?xml version="1.0"?>
<ruleset name="Presence API Coding Standards">
<description>WordPress Coding Standards for the Presence API plugin.</description>
<arg name="extensions" value="php"/>
<arg name="basepath" value="./"/>
<arg name="parallel" value="8"/>
<arg value="ps"/>
<!-- Scan plugin source files and unit tests. -->
<file>plugins/presence-api/presence-api.php</file>
<file>plugins/presence-api/includes/</file>
<file>plugins/presence-api/tests/</file>
<file>plugins/presence-api/uninstall.php</file>
<file>plugins/presence-scenes/</file>
<file>plugins/presence-debugger/</file>
<!-- Exclude test and demo files from coding standards. -->
<exclude-pattern>plugins/presence-scenes/tests/</exclude-pattern>
<exclude-pattern>plugins/presence-debugger/tests/</exclude-pattern>
<exclude-pattern>plugins/presence-api/tests/stubs/</exclude-pattern>
<exclude-pattern>^tests/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>
<!-- Use WordPress Coding Standards. -->
<rule ref="WordPress">
<!-- Allow short array syntax — common in modern WP development. -->
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
</rule>
<!-- Tests follow the same standard, less the rules that do not fit them, as core does. -->
<rule ref="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Commenting.DocComment.ShortNotCapital">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Commenting.DocComment.LongNotCapital">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment.Missing">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment.SpacingAfter">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.MissingParamTag">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.WrongStyle">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.VariableComment.Missing">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.DB.DirectDatabaseQuery">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.NonceVerification">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions">
<exclude-pattern>plugins/presence-api/tests/*</exclude-pattern>
</rule>
<!-- Meta capability mapped in wp_presence_map_meta_cap(). -->
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="view_presence_location"/>
</property>
</properties>
</rule>
<!-- Check for PHP cross-version compatibility. -->
<config name="testVersion" value="7.4-"/>
<rule ref="PHPCompatibilityWP"/>
<!-- Verify text domain. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="presence-api"/>
<element value="presence-scenes"/>
</property>
</properties>
</rule>
<!-- Set minimum supported WP version for deprecated function checks. -->
<config name="minimum_wp_version" value="7.0"/>
</ruleset>