-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
99 lines (79 loc) · 3.18 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<description>PHP_CodeSniffer ruleset.</description>
<file>wp-block-template-part.php</file>
<file>src/.</file>
<file>includes/.</file>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/resources/*</exclude-pattern>
<exclude-pattern>*/assets/*</exclude-pattern>
<!-- Show progress, show the error codes for each message (source). -->
<arg value="ps" />
<!-- Strip the filepaths in reports down to the relevant bit. -->
<arg name="basepath" value="./" />
<!-- Check up to 8 files simultaneously. -->
<arg name="parallel" value="8" />
<!-- Configs -->
<config name="minimum_supported_wp_version" value="5.0" />
<config name="testVersion" value="7.0-" />
<rule ref="WordPress">
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.ShortPrefixPassed"/>
<exclude name="WordPress.PHP.YodaConditions"/>
<exclude name="WordPress.DB.PreparedSQL"/>
<exclude name="WordPress.PHP.StrictInArray"/>
<exclude name="WordPress.Security.NonceVerification"/>
<exclude name="WordPress.PHP.DisallowShortTernary"/>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="wp-block-template-part" />
</properties>
</rule>
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>src/</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>src/</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName">
<properties>
<property name="customPropertiesWhitelist" type="array" value="clientId,clientSecret,redirectUri"/>
</properties>
</rule>
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
<properties>
<!-- No need to adjust alignment of large arrays when the item with the largest key is removed. -->
<property name="exact" value="false"/>
<!-- Don't align multi-line items if ALL items in the array are multi-line. -->
<property name="alignMultilineItems" value="!=100"/>
<!-- Array assignment operator should always be on the same line as the array key. -->
<property name="ignoreNewlines" value="false"/>
</properties>
</rule>
<rule ref="PHPCompatibilityWP" />
<rule ref="Generic.Commenting">
<exclude-pattern>tests/</exclude-pattern>
<exclude-pattern>assets/</exclude-pattern>
<exclude name="Generic.Commenting.DocComment.NonParamGroup" />
</rule>
<rule ref="Generic.Files.LineEndings">
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
<exclude-pattern>tests/e2e-tests/</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment.MissingPackageTag">
<exclude-pattern>tests/</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>tests/</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionCommentThrowTag.Missing">
<exclude-pattern>tests/</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>tests/</exclude-pattern>
</rule>
</ruleset>