-
Notifications
You must be signed in to change notification settings - Fork 15
/
phpcs.xml
52 lines (44 loc) · 2.02 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0"?>
<ruleset name="Pantheon WP Composer Managed">
<description>Pantheon WordPress Composer Managed Upstream</description>
<!-- Scan all files in directory -->
<file>.</file>
<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>
<!-- Ignore WordPress and Composer dependencies -->
<exclude-pattern>web/*.php</exclude-pattern>
<exclude-pattern>web/wp</exclude-pattern>
<exclude-pattern>web/app/themes/twentytwentytwo/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<!-- Start Pantheon addition: Ignore plugins and quicksilver scripts -->
<exclude-pattern>web/app/mu-plugins/*</exclude-pattern>
<!-- This line prevents all plugins from being linted. Remove this line if you want to lint plugins. -->
<exclude-pattern>web/app/plugins/*</exclude-pattern>
<exclude-pattern>web/private/*</exclude-pattern>
<exclude-pattern>upstream-configuration/*</exclude-pattern>
<!-- Ignore sniffs against things that we explicitly want for Pantheon upstreams. -->
<rule ref="Pantheon-WP">
<exclude name="WordPress.PHP.IniSet.display_errors_Disallowed">
<exclude-pattern>config/application.php</exclude-pattern>
</exclude>
<exclude name="WordPress.PHP.IniSet.display_errors_Blacklisted">
<exclude-pattern>config/application.php</exclude-pattern>
</exclude>
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotSanitized">
<exclude-pattern>config/application.php</exclude-pattern>
</exclude>
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotValidated">
<exclude-pattern>config/application.php</exclude-pattern>
</exclude>
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited">
<exclude-pattern>config/application.php</exclude-pattern>
</exclude>
</rule>
<!-- End Pantheon addition -->
<!-- Show colors in console -->
<arg value="-colors"/>
<!-- Show sniff codes in all reports -->
<arg value="ns"/>
<!-- Use Pantheon-WP as a base -->
<rule ref="Pantheon-WP"/>
</ruleset>