-
Notifications
You must be signed in to change notification settings - Fork 5
/
.phpcs.xml
72 lines (67 loc) · 3.11 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0"?>
<ruleset name="Pantheon WP Coding Standards">
<description>Pantheon WordPress Coding Standards.</description>
<!-- What to scan -->
<file>.</file>
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/assets/</exclude-pattern>
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit -->
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. -->
<!-- Rules: Check PHP version compatibility -->
<config name="testVersion" value="7.4-"/>
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/>
<!-- Rules: Pantheon WP WordPress Coding Standards -->
<config name="minimum_supported_wp_version" value="4.6"/>
<rule ref="Pantheon-WP">
<exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery">
<exclude-pattern>*/*</exclude-pattern>
</exclude>
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching">
<exclude-pattern>inc/network/includes-network.php</exclude-pattern>
</exclude>
<exclude name="WordPress.Security.NonceVerification.Missing">
<exclude-pattern>inc/network/includes-network.php</exclude-pattern>
</exclude>
<exclude name="WordPress.Security.NonceVerification.Recommended">
<exclude-pattern>inc/pantheon-page-cache.php</exclude-pattern>
</exclude>
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotValidated">
<exclude-pattern>inc/network/includes-network.php</exclude-pattern>
</exclude>
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotSanitized">
<exclude-pattern>inc/network/includes-network.php</exclude-pattern>
</exclude>
<exclude name="WordPressVIPMinimum.Files.IncludingFile.NotAbsolutePath">
<exclude-pattern>pantheon.php</exclude-pattern>
</exclude>
<exclude name="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>*/*</exclude-pattern>
</exclude>
<exclude name="WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsUnknown">
<exclude-pattern>*/*</exclude-pattern>
</exclude>
<exclude name="WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid">
<exclude-pattern>inc/pantheon-page-cache.php</exclude-pattern>
</exclude>
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed">
<exclude-pattern>inc/pantheon-page-cache.php</exclude-pattern>
</exclude>
<!-- Ignore missing doc comments in pantheon-page-cache.php for now. -->
<exclude name="Squiz.Commenting.FunctionComment.Missing">
<exclude-pattern>inc/pantheon-page-cache.php</exclude-pattern>
</exclude>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment">
<exclude-pattern>inc/pantheon-page-cache.php</exclude-pattern>
</exclude>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag">
<exclude-pattern>inc/pantheon-page-cache.php</exclude-pattern>
</exclude>
<exclude name="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>inc/pantheon-page-cache.php</exclude-pattern>
</exclude>
</rule>
</ruleset>