-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
phpcs.xml
50 lines (44 loc) · 1.86 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
<?xml version="1.0"?>
<ruleset name="Coding Standards">
<description>Coding standard for WordPress plugins</description>
<!-- Pass some flags to PHPCS:
p flag: Show progress of the run.
s flag: Show sniff codes in all reports.
v flag: Print verbose output.
n flag: Do not print warnings.
-->
<arg value="psvn"/>
<!-- use colors in output -->
<arg name="colors"/>
<!-- ignore vendor files-->
<file>.</file>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>*.css</exclude-pattern>
<exclude-pattern>*.js</exclude-pattern>
<!-- WordPress coding standards -->
<config name="minimum_supported_wp_version" value="4.5"/>
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<!-- This raises errors, because __DIR__ is not used, but we still support PHP 5.2 -->
<exclude name="Modernize.FunctionCalls.Dirname.FileConstant"/>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma. -->
<property name="prefixes" type="array" value="Antispam_Bee,ab_"/>
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<!-- Value: replace the text domain used. Separate multiple prefixes with a comma. -->
<property name="text_domain" type="array" value="antispam-bee"/>
</properties>
</rule>
<!-- Include sniffs for PHP cross-version compatibility. -->
<config name="testVersion" value="5.2-"/>
<rule ref="PHPCompatibilityWP">
</rule>
</ruleset>