-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
55 lines (46 loc) · 1.88 KB
/
phpcs.xml.dist
File metadata and controls
55 lines (46 loc) · 1.88 KB
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="Admin Only Coding Standards">
<description>WordPress Coding Standards for Admin Only plugin</description>
<!-- How to scan -->
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage -->
<arg value="ps"/>
<arg name="colors"/>
<arg name="basepath" value="."/>
<arg name="parallel" value="20"/>
<arg name="extensions" value="php"/>
<arg name="cache" value=".phpcs-cache"/>
<!-- Check all PHP files in the plugin directory -->
<file>.</file>
<!-- Exclude directories -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/.git/*</exclude-pattern>
<!-- Rules: WordPress Coding Standards -->
<!-- https://github.com/WordPress/WordPress-Coding-Standards -->
<rule ref="WordPress">
<!-- Exclude some rules that are not needed -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
</rule>
<!-- Rules: PHP Compatibility -->
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/>
<!-- Project Config -->
<config name="minimum_supported_wp_version" value="6.8.2"/>
<config name="testVersion" value="8.2-"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="admin-only"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="admon"/>
</property>
</properties>
</rule>
</ruleset>