forked from wp-media/wp-rocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
65 lines (61 loc) · 2.83 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
<?xml version="1.0"?>
<ruleset name="WPRocket">
<description>Caching plugin for WordPress by WP Media.</description>
<arg name="extensions" value="php"/>
<!--<arg value="s"/>-->
<!-- Run against the PHPCompatibility ruleset -->
<rule ref="PHPCompatibility"/>
<!-- Check for cross-version support for PHP 5.6 and higher. -->
<config name="testVersion" value="5.6-"/>
<config name="minimum_supported_wp_version" value="4.7"/>
<file>.</file>
<exclude-pattern>/inc/deprecated/*</exclude-pattern>
<exclude-pattern>/inc/vendors/*</exclude-pattern>
<exclude-pattern>/tests/Integration/*</exclude-pattern>
<exclude-pattern>/tests/Unit/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<rule ref="WordPress">
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma"/>
<exclude name="Generic.PHP.NoSilencedErrors.Discouraged"/>
<exclude name="PEAR.Functions.FunctionCallSignature.Indent"/>
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/>
<exclude name="Squiz.Commenting.FileComment.Missing"/>
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag"/>
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="rocket" />
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array" value="rocket,wp_rocket" />
</properties>
</rule>
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false" />
</properties>
</rule>
<rule ref="WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler">
<exclude-pattern>inc/classes/class-secure-stream-logger.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_read_fopen">
<exclude-pattern>inc/classes/class-secure-stream-logger.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_read_fwrite">
<exclude-pattern>inc/classes/class-secure-stream-logger.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_read_fclose">
<exclude-pattern>inc/classes/class-secure-stream-logger.php</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_read_readfile">
<exclude-pattern>inc/classes/buffer/class-cache.php</exclude-pattern>
</rule>
<rule ref="WordPress.PHP.NoSilencedErrors.Discouraged">
<exclude-pattern>inc/classes/buffer/class-cache.php</exclude-pattern>
<exclude-pattern>inc/classes/class-secure-stream-logger.php</exclude-pattern>
</rule>
</ruleset>