-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathphpcs.xml
More file actions
89 lines (77 loc) · 2.98 KB
/
phpcs.xml
File metadata and controls
89 lines (77 loc) · 2.98 KB
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
<?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="6.6"/>
<config name="testVersion" value="7.4-"/>
<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
<exclude name="Generic.Functions.FunctionCallArgumentSpacing" />
<exclude name ="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
<exclude name ="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name ="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
</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.PHP.NoSilencedErrors">
<properties>
<property name="usePHPFunctionsList" value="true"/>
<property name="customAllowedFunctionsList" type="array">
<element value="imagecreatefrompng"/>
</property>
</properties>
</rule>
<!--
Disregard certain WordPress rules in tests.
-->
<rule ref="WordPress.WP.AlternativeFunctions">
<exclude-pattern>tests/**/*\.php</exclude-pattern>
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<exclude-pattern>tests/**/*\.php</exclude-pattern>
</rule>
<!--
To get the optimal benefits of using WPCS, we should add a couple of
custom properties.
Adjust the values of these properties to fit our needs.
For information on additional custom properties available, check out
the wiki:
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties
-->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="avatar-privacy"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="avatar_privacy"/>
<element value="avapr"/>
</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>
<!-- Exclude generated block assets file -->
<exclude-pattern>*/admin/blocks/*/*\.asset\.php$</exclude-pattern>
</ruleset>