-
Notifications
You must be signed in to change notification settings - Fork 101
/
phpcs.xml.dist
84 lines (71 loc) · 3.75 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?xml version="1.0"?>
<ruleset name="VIP-Go-mu-plugins">
<description>Custom ruleset for VIP Go mu-plugins</description>
<!-- For help in understanding this file: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- For help in using PHPCS: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<!-- What to scan -->
<file>.</file>
<!-- Ignoring Files and Folders:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders -->
<!-- Submodules - these should have their own PHPCS configurations -->
<exclude-pattern>advanced-post-cache/*</exclude-pattern>
<exclude-pattern>cron-control/*</exclude-pattern>
<exclude-pattern>cron-control-next/*</exclude-pattern>
<exclude-pattern>debug-bar-cron/*</exclude-pattern>
<exclude-pattern>gutenberg-ramp/*</exclude-pattern>
<exclude-pattern>http-concat/*</exclude-pattern>
<exclude-pattern>jetpack/*</exclude-pattern>
<exclude-pattern>jetpack-*/*</exclude-pattern>
<exclude-pattern>lightweight-term-count-update/*</exclude-pattern>
<exclude-pattern>query-monitor/*</exclude-pattern>
<exclude-pattern>rewrite-rules-inspector/*</exclude-pattern>
<exclude-pattern>vip-dashboard/*</exclude-pattern>
<exclude-pattern>vip-support/*</exclude-pattern>
<!-- Other directories -->
<exclude-pattern>\.git/*</exclude-pattern>
<exclude-pattern>akismet/*</exclude-pattern>
<exclude-pattern>bin/*</exclude-pattern>
<exclude-pattern>debug-bar/*</exclude-pattern>
<exclude-pattern>drop-ins/*</exclude-pattern>
<exclude-pattern>search/elasticpress/*</exclude-pattern>
<exclude-pattern>search/debug-bar-elasticpress/*</exclude-pattern>
<exclude-pattern>search/es-wp-query/*</exclude-pattern>
<exclude-pattern>shared-plugins/*</exclude-pattern>
<exclude-pattern>vaultpress/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>wordpress-importer/*</exclude-pattern>
<exclude-pattern>wp-cron-control/*</exclude-pattern>
<exclude-pattern>test-jquery-updates/*</exclude-pattern>
<!-- How to scan -->
<!-- Strip the file paths down to the relevant bit -->
<arg name="basepath" value="."/>
<!-- Enables parallel processing when available for faster results. -->
<arg name="parallel" value="8"/>
<!-- Limit to PHP files -->
<arg name="extensions" value="php"/>
<config name="ignore_warnings_on_exit">true</config>
<!-- Rules: Check PHP version compatibility - see
https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/>
<!-- For help in understanding this testVersion:
https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
<config name="testVersion" value="7.3-"/>
<!-- Rules: WordPress Coding Standards - see
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<!-- WordPress-Extra includes WordPress-Core -->
<rule ref="WordPress-Extra"/>
<!-- For help in understanding these custom sniff properties:
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="5.3"/>
<!-- Rules: Check VIP Coding Standards - see
https://github.com/Automattic/VIP-Coding-Standards/ -->
<rule ref="WordPress-VIP-Go">
<exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.internal_wpcom_vip_irc"/>
<!-- These disallow anonymous functions as action callbacks -->
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
<!-- Allow short array syntax -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" />
</rule>
</ruleset>