-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathphpcs.xml.dist
55 lines (44 loc) · 1.88 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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for WP Plugin Starter Plugin">
<description>Sniffs for WordPress plugins, with minor modifications for WP Plugin Starter</description>
<!-- Only scan PHP files. -->
<arg name="extensions" value="php" />
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./" />
<!-- Check up to 8 files simultaneously. -->
<arg name="parallel" value="8" />
<!-- Show sniff codes in all reports. -->
<arg value="ps" />
<file>.</file>
<!-- Directories and third party library exclusions. -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Configs -->
<config name="minimum_supported_wp_version" value="5.4" />
<config name="testVersion" value="5.6-" />
<!-- PHPCompatibility -->
<rule ref="PHPCompatibilityWP" />
<!-- WordPress -->
<rule ref="WordPress">
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching" />
<exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery" />
<exclude name="WordPress.DB.DirectDatabaseQuery.SchemaChange" />
<!-- Ignore filename error since that won't be renamed. -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<!-- Ignore base64_encode() obfuscation error in parser -->
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode" />
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="wp-plugin-starter" />
</properties>
</rule>
<!-- Rules -->
<rule ref="Squiz.Commenting">
<!-- Don't make comment formatting quite as strict -->
<exclude name="Squiz.Commenting.InlineComment.SpacingAfter" />
<exclude name="Squiz.Commenting.LongConditionClosingComment" />
<exclude name="Squiz.Commenting.PostStatementComment" />
</rule>
</ruleset>