-
Notifications
You must be signed in to change notification settings - Fork 0
/
.phpcs.xml.dist
66 lines (52 loc) · 2.39 KB
/
.phpcs.xml.dist
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
<?xml version="1.0"?>
<ruleset name="Plugin Mold PHPCS">
<description>Rules that get your plugin broadly meeting WordPress standards</description>
<config name="testVersion" value="8.1" />
<config name="minimum_supported_wp_version" value="6.0" />
<config name="text_domain" value="wp-plugin-mold" />
<config name="prefixes" value="" />
<config name="warningSeverity" value="0"/>
<file>wp-plugin-mold.php</file>
<file>src</file>
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="severity" value="1" /> <!-- Set severity argument -->
<arg name="colors"/> <!-- Show results with colors. Disable if working on Windows -->
<arg name="parallel" value="8"/> <!-- Enables parallel processing when available for faster results -->
<arg name="extensions" value="php"/> <!-- Limit to PHP files -->
<ini name="memory_limit" value="-1" /> <!-- Increase memory limit -->
<!-- Exclude certain folders and files from being checked. -->
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Standards -->
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/>
<!-- WordPress-VIP-Go -->
<rule ref="WordPress-VIP-Go">
<exclude name="WordPressVIPMinimum.Security.Mustache.OutputNotation" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
</rule>
<!-- WordPress Extra -->
<rule ref="WordPress-Extra">
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned" />
<exclude name="PSR2.Namespaces.NamespaceDeclaration" />
<exclude name="Universal.Operators.DisallowShortTernary.Found" />
</rule>
<!-- WooCommerce -->
<rule ref="WooCommerce"/>
<!-- WordPress-Security -->
<rule ref="WordPress.Security"/>
<!-- WordPress Enqueued Scripts -->
<rule ref="WordPress.WP.EnqueuedResources"/>
<!-- Docs -->
<rule ref="WordPress-Docs" />
<!-- End with newlines -->
<rule ref="Generic.Files.EndFileNewline" />
<!-- Code Complexity -->
<rule ref="Generic.Metrics.CyclomaticComplexity"/>
<rule ref="Generic.Metrics.NestingLevel"/>
</ruleset>