-
Notifications
You must be signed in to change notification settings - Fork 0
/
.phpcs.xml
70 lines (59 loc) · 2.51 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
<?xml version="1.0"?>
<ruleset name="WordPress-LSX"
namespace="WordPressCS\WordPress"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>Coding standards</description>
<!-- Pass some flags to PHPCS:
p flag: Show progress of the run.
s flag: Show sniff codes in all reports.
-->
<arg value="ps"/>
<!-- Check up to 8 files simultanously. -->
<arg name="parallel" value="8"/>
<!-- Check all files in this directory and the directories below it. -->
<file>.</file>
<!-- Exclude directories. -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/woocommerce/*</exclude-pattern>
<exclude-pattern>*/tribe-events/*</exclude-pattern>
<exclude-pattern>*/.github/*</exclude-pattern>
<exclude-pattern>*/build/*</exclude-pattern>
<exclude-pattern>gulpfile\.js</exclude-pattern>
<exclude-pattern>*/wp-content/*</exclude-pattern>
<!-- Check up to 8 files simultaneously. -->
<arg name="parallel" value="8" />
<config name="minimum_supported_wp_version" value="5.2" />
<config name="testVersion" value="7.0-" />
<rule ref="WordPress">
<!-- @TODO remove this exclusion: -->
<exclude name="Squiz.Commenting" />
<exclude name="Generic.Commenting" />
<exclude name="Generic.WhiteSpace" />
<exclude name="Squiz.WhiteSpace" />
<exclude name="Squiz.Scope.MethodScope.Missing" />
<exclude name="WordPress.WP.EnqueuedResourceParameters.MissingVersion" />
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited" />
<!-- Not interested in whitespace issues at the moment -->
<exclude name="PEAR.Functions.FunctionCallSignature" />
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma" />
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
</rule>
<!-- Not interested in whitespace issues in JS and CSS files at the moment -->
<rule ref="Squiz.WhiteSpace">
<exclude-pattern>*\.css</exclude-pattern>
<exclude-pattern>*\.js</exclude-pattern>
</rule>
<rule ref="WordPress.WhiteSpace">
<exclude-pattern>*\.css</exclude-pattern>
<exclude-pattern>*\.js</exclude-pattern>
</rule>
<rule ref="Generic.PHP.Syntax"/>
<rule ref="WordPress.WP.DeprecatedFunctions">
<properties>
<property name="minimum_supported_version" value="5.2" />
</properties>
</rule>
</ruleset>