-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathphpcs.xml
38 lines (29 loc) · 1.19 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
<?xml version="1.0"?>
<ruleset name="wp-cubi">
<description>wp-cubi coding standards</description>
<!-- Scan all files in directory -->
<file>.</file>
<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>
<!-- Ignore dependencies -->
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/web/wpcb/</exclude-pattern>
<exclude-pattern>/web/app/modules/</exclude-pattern>
<exclude-pattern>/web/app/mu-modules/(?!(00-wp-cubi-core-mu/|10-wp-cubi-admin-bar/))*/</exclude-pattern>
<!-- Ignore local files -->
<exclude-pattern>/config/vars.*</exclude-pattern>
<exclude-pattern>/config/local.php</exclude-pattern>
<exclude-pattern>/config/salt-keys.php</exclude-pattern>
<!-- RoboFile.php can't have a namespace -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>/RoboFile.php</exclude-pattern>
</rule>
<!-- Show colors in console -->
<arg value="-colors"/>
<!-- Show sniff codes in all reports -->
<arg value="ns"/>
<!-- Use PSR-12 as a base -->
<rule ref="PSR12"/>
<!-- Custom rule: disallow long `array()` syntax, use short `[]` syntax instead -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
</ruleset>