-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.ruleset.xml
43 lines (35 loc) · 1.54 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
<?xml version="1.0"?>
<ruleset>
<!-- 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"/>
<!-- Use HM Coding Standards -->
<rule ref="vendor/humanmade/coding-standards">
<!-- Disable all ESLint checks -->
<exclude name="HM.Debug.ESLint"/>
<!-- Disable rules Pressbooks disagrees with -->
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.MemberNotSnakeCase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar"/>
<exclude name="WordPress.VIP.SessionVariableUsage"/>
<exclude name="WordPress.VIP.SessionFunctionsUsage"/>
<!-- Disable LayoutOrder until humanmade/coding-standards#5 is fixed -->
<exclude name="HM.Layout.Order.WrongOrder"/>
</rule>
<!-- Re-enable rules Pressbooks agrees with -->
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="PSR1.Methods.CamelCapsMethodName" />
<!-- Disable Side Effects rule for bootstrapping file -->
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>/functions.php</exclude-pattern>
</rule>
<!-- Disable Namespaced Functions for bootstrapping file -->
<rule ref="HM.Functions.NamespacedFunctions">
<exclude-pattern>/functions.php</exclude-pattern>
</rule>
</ruleset>