-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml
73 lines (60 loc) · 2.32 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
<?xml version="1.0"?>
<ruleset name="MundschenkWordPressPlugin">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<!-- Set a description for this ruleset. -->
<description>A custom set of code standard rules to check for WordPress plugins.</description>
<config name="minimum_supported_wp_version" value="5.9"/>
<config name="testVersion" value="7.4-"/>
<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
<exclude name="Generic.Functions.FunctionCallArgumentSpacing" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax" />
</rule>
<rule ref="WordPress-Docs" />
<rule ref="WordPress-Extra" />
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
<properties>
<property name="exact" value="false" />
<property name="maxColumn" value="70" />
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="media-credit"/>
</property>
</properties>
</rule>
<rule ref="WordPress.Files.FileName">
<exclude-pattern>tests/**</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="media_credit"/>
<element value="media"/>
</property>
</properties>
<exclude-pattern>*/partials/*\.php</exclude-pattern>
</rule>
<!-- Include sniffs for PHP cross-version compatibility. -->
<rule ref="PHPCompatibilityWP" />
<!-- Check for undefined variables, except in partials. -->
<rule ref="VariableAnalysis">
<properties>
<property name="allowUnusedFunctionParameters" value="1" />
</properties>
<exclude-pattern>*/partials/*\.php</exclude-pattern>
</rule>
<!-- Check for unused symbols (or imports) -->
<rule ref="ImportDetection"/>
<rule ref="ImportDetection.Imports.RequireImports">
<properties>
<property name="ignoreUnimportedSymbols" value="/^Brain\\Monkey\\(Actions|Filters|Functions)$/"/>
<property name="ignoreGlobalsWhenInGlobalScope" value="true"/>
<property name="ignoreWordPressSymbols" value="true"/>
</properties>
</rule>
</ruleset>