-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
69 lines (69 loc) · 2.61 KB
/
phpcs.xml.dist
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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<description>A custom PHPCS Ruleset for WordPress Plugins and Themes</description>
<!-- Check files in this directory and subdirectories. -->
<file>.</file>
<!-- Exclude some directories. -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<!-- Pass flags to PHPCS:
p: Show progress of the run.
s: Show sniff codes in all reports.
v: Print verbose output.
-->
<arg value="psv"/>
<!-- Strip the filepaths down to the relevant bit. Disabled, bug with VSCode. -->
<!-- <arg name="basepath" value="./"/> -->
<!-- Only check PHP files. -->
<arg name="extensions" value="php,css,scss/css"/>
<!-- Use the WordPress ruleset -->
<rule ref="WordPress" />
<!-- Allow theme-specific exceptions to WordPress filename rules. -->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="is_theme" value="true"/>
</properties>
</rule>
<!-- Verify that no WP functions are used which are deprecated or removed. -->
<rule ref="WordPress.WP.DeprecatedFunctions">
<properties>
<property name="minimum_supported_version" value="5.2"/>
</properties>
</rule>
<!-- Check all globals have the expected prefix. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="minimalist" />
</property>
</properties>
</rule>
<!-- Check all I18n function calls have the expected text domain. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="Minimalist-Tags-List"/>
</property>
<property name="check_translator_comments" value="true"/>
</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"/>
<!-- Check the maximum position within a line. -->
<property name="maxColumn" value="80"/>
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
<properties>
<property name="blank_line_check" value="true"/>
<property name="blank_line_after_check" value="true"/>
<property name="spaces_before_closure_open_paren" value="0"/>
<property name="space_before_colon" value="required"/>
</properties>
</rule>
</ruleset>