-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathphpcs.ruleset.xml
74 lines (66 loc) · 2.92 KB
/
phpcs.ruleset.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
74
<?xml version="1.0"?>
<ruleset>
<!-- Scan these files -->
<file>/members</file>
<file>/plugins</file>
<file>/registration</file>
<file>/templates</file>
<file>/*.php</file>
<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>
<!-- Show colors in console -->
<arg value="-colors"/>
<!-- Show progress -->
<arg value="p"/>
<!-- Be quiet -->
<arg value="q"/>
<!-- Include source codes in the report -->
<arg value="s"/>
<!-- Use HM Coding Standards -->
<rule ref="vendor/humanmade/coding-standards">
<!-- Disable all ESLint checks -->
<exclude name="HM.Debug.ESLint"/>
<!-- Disable rules we disagree with -->
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.MemberNotSnakeCase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar"/>
<!-- Disable LayoutOrder until humanmade/coding-standards#5 is fixed -->
<exclude name="HM.Layout.Order.WrongOrder"/>
</rule>
<!-- Re-enable rules we agree with -->
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<!-- Disable Side Effects rule for bootstrapping file, extends WordPress core, cron scripts -->
<exclude-pattern>/bin/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/tests/*</exclude-pattern>
<!-- EM_Events is an object we do not own -->
<rule ref="WordPress.NamingConventions.ValidVariableName.NotSnakeCase">
<exclude-pattern>/plugins/events-manager/*</exclude-pattern>
<exclude-pattern>/functions.php</exclude-pattern>
<exclude-pattern>/eypd-actions.php</exclude-pattern>
<exclude-pattern>/eypd-events.php</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.StringNotSnakeCase">
<exclude-pattern>/plugins/events-manager/*</exclude-pattern>
</rule>
<!-- The functions in these files override parent functions (namespacing not an option) -->
<rule ref="HM.Functions.NamespacedFunctions.MissingNamespace">
<exclude-pattern>/functions.php</exclude-pattern>
<exclude-pattern>/eypd-actions.php</exclude-pattern>
<exclude-pattern>/eypd-events.php</exclude-pattern>
</rule>
<!-- temp exceptions until id types (string/int) verified not to have negative effect -->
<rule ref="WordPress.PHP.StrictComparisons.LooseComparison">
<exclude-pattern>/eypd-events.php</exclude-pattern>
<exclude-pattern>/eypd-actions.php</exclude-pattern>
<exclude-pattern>/plugins/events-manager/forms/event/location.php</exclude-pattern>
<exclude-pattern>/plugins/events-manager/placeholders/bookingform.php</exclude-pattern>
</rule>
<rule ref="WordPress.PHP.StrictInArray.MissingTrueStrict">
<exclude-pattern>/plugins/events-manager/buddypress/profile.php</exclude-pattern>
</rule>
<!-- include file plus declare functions, doesn't like -->
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>/functions.php</exclude-pattern>
</rule>
</ruleset>