-
Notifications
You must be signed in to change notification settings - Fork 32
/
.phpcs.xml.dist
81 lines (62 loc) · 2.75 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
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="WP-Post-Meta-Revisions" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>The coding standard for the WP-Post-Meta-Revisions plugin.</description>
<!--
#############################################################################
COMMAND LINE ARGUMENTS
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
#############################################################################
-->
<file>.</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Only check PHP files. -->
<arg name="extensions" value="php"/>
<!-- Show progress. -->
<arg value="p"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./"/>
<!--
#############################################################################
USE THE WordPress and the PHPCompatibilityWP RULESETS
#############################################################################
-->
<!-- Check code for cross-version PHP compatibility. -->
<config name="testVersion" value="5.6-"/>
<rule ref="PHPCompatibilityWP"/>
<!-- Check code against the complete WordPress Coding Standards. -->
<rule ref="WordPress">
<!-- No need to lint the PHP, this is done in a separate task in the travis script. -->
<exclude name="Generic.PHP.Syntax"/>
</rule>
<!--
#############################################################################
SNIFF SPECIFIC CONFIGURATION
#############################################################################
-->
<!-- Set minimum supported WP version for all sniffs which use it. -->
<config name="minimum_supported_wp_version" value="4.7"/>
<!-- Verify that all gettext calls use the correct text domain. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="post-meta-revisions"/>
</property>
</properties>
</rule>
<!-- Verify that everything in the global namespace is prefixed with a theme specific prefix.
Multiple valid prefixes can be provided as a comma-delimited list. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<!-- Provide the prefixes to look for. -->
<property name="prefixes" type="array">
<element value="wp_post_meta_revisioning"/>
</property>
</properties>
<!-- Anything test related does not need to be prefixed as it is not shipped with the plugin. -->
<exclude-pattern>/tests/*\.php$</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName">
<!-- Don't trigger on the main file as renaming it would deactivate the plugin. -->
<exclude-pattern>/wp-post-meta-revisions\.php$</exclude-pattern>
</rule>
</ruleset>