-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.ruleset.xml
61 lines (57 loc) · 2.03 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
<?xml version="1.0"?>
<ruleset name="open sage">
<!-- Scan these files -->
<file>resources/functions.php</file>
<file>resources/index.php</file>
<file>app</file>
<file>resources/views</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 rules we disagree with: -->
<exclude name="HM.Files.NamespaceDirectoryName.NoIncDirectory"/>
<exclude name="HM.Files.FunctionFileName.WrongFile"/>
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found"/>
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment"/>
</rule>
<!-- Re-enable PSR rules we agree with -->
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="PSR1.Methods.CamelCapsMethodName"/>
<!-- Disable Side Effects rule for cron scripts -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>/bin/*</exclude-pattern>
<exclude-pattern>/tests/</exclude-pattern>
</rule>
<rule ref="PSR1">
<exclude-pattern>/tests/</exclude-pattern>
</rule>
<rule ref="HM.Functions.NamespacedFunctions.MissingNamespace">
<exclude-pattern>/bin/*</exclude-pattern>
<exclude-pattern>/tests/</exclude-pattern>
</rule>
<!-- Sage specific -->
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>/app/controllers/*</exclude-pattern>
</rule>
<rule ref="HM.Files.ClassFileName.MismatchedName">
<exclude-pattern>/app/controllers/*</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>/app/controllers/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidHookName.UseUnderscores">
<exclude-pattern>/app/*</exclude-pattern>
</rule>
<rule ref="Internal.NoCodeFound">
<exclude-pattern>/resources/views/</exclude-pattern>
</rule>
</ruleset>