-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathphpcs.xml
54 lines (49 loc) · 2.33 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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="WP Media" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>The custom ruleset for WP Media.</description>
<file>.</file>
<exclude-pattern>/Tests/Fixtures/</exclude-pattern>
<exclude-pattern>/Tests/Unit/</exclude-pattern>
<exclude-pattern>/Tests/Integration/</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<arg name="basepath" value="src"/>
<arg value="sp"/><!-- Show sniff and progress -->
<arg name="colors"/><!-- Show results with colors -->
<arg name="parallel" value="50"/><!-- Enables parallel processing when available for faster results. -->
<arg name="extensions" value="php"/><!-- Limit to PHP files -->
<!-- Rules: Check PHP version compatibility - see https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="7.0-"/>
<config name="minimum_supported_wp_version" value="5.4"/>
<rule ref="WordPress">
<exclude name="Squiz.Commenting.FileComment.Missing"/>
<exclude name="Squiz.Commenting.ClassComment.Missing"/>
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
</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,WPMedia,WPRocket" />
</properties>
</rule>
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false" />
</properties>
</rule>
<!-- Rules: WordPress Coding Standards - see
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
WordPress-Extra includes WordPress-Core -->
<rule ref="WordPress-Extra">
<exclude name="WordPress.PHP.DisallowShortTernary.Found"/>
</rule>
<!-- Enforce short array syntax: `[]` in place of `array()`. -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
</ruleset>