forked from mundschenk-at/wp-typography
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
66 lines (57 loc) · 2.33 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
<?xml version="1.0"?>
<ruleset name="WordPress Plugin Coding Standards">
<description>
A custom set of code standard rules to check for WordPress plugins:
* 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
</description>
<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">
<exclude name="WordPress.Arrays.CommaAfterArrayItem.SpaceAfterComma" />
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
</rule>
<rule ref="WordPress-Docs" />
<rule ref="WordPress-Extra" />
<rule ref="WordPress.NamingConventions.ValidVariableName">
<properties>
<property name="customPropertiesWhitelist" type="array" value="nodeValue,parentNode,childNodes,tagName,ownerDocument,nextSibling,previousSibling,firstChild,lastChild" />
</properties>
</rule>
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
<properties>
<property name="exact" value="false" />
<property name="maxColumn" value="70" />
</properties>
</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="wp-typography"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="WP_Typography"/>
<element value="typo_"/>
</property>
</properties>
<exclude-pattern>*/partials/*\.php</exclude-pattern>
<exclude-pattern>*/tests/*\.php</exclude-pattern>
</rule>
<!-- Include sniffs for PHP cross-version compatibility. -->
<rule ref="PHPCompatibility" />
<!-- Exclude generated files (block assets and language names) -->
<exclude-pattern>*/admin/block-editor/*/*\.asset\.php$</exclude-pattern>
<exclude-pattern>includes/_language_names.php$</exclude-pattern>
</ruleset>