-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
51 lines (46 loc) · 1.84 KB
/
phpcs.xml
File metadata and controls
51 lines (46 loc) · 1.84 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
<?xml version="1.0"?>
<ruleset name="{{name}} Coding Standards">
<description>Coding standards for {{name}} WordPress plugin.</description>
<!-- What to scan -->
<file>.</file>
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/node_modules/</exclude-pattern>
<exclude-pattern>/build/</exclude-pattern>
<exclude-pattern>/tests/</exclude-pattern>
<exclude-pattern>/tmp/</exclude-pattern>
<exclude-pattern>/logs/</exclude-pattern>
<exclude-pattern>/generated-plugins/</exclude-pattern>
<!-- Exclude scaffold files with mustache placeholders -->
<exclude-pattern>inc/class-*.php</exclude-pattern>
<exclude-pattern>src/blocks/{{slug}}-*/</exclude-pattern>
<exclude-pattern>src/components/</exclude-pattern>
<exclude-pattern>patterns/{{slug}}-*.php</exclude-pattern>
<exclude-pattern>{{plugin_slug}}.php</exclude-pattern>
<file>./{{plugin_slug}}.php</file>
<file>./uninstall-{{plugin_slug}}.php</file>
<!-- How to scan -->
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="8"/>
<!-- Rules: WordPress Coding Standards -->
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<!-- Allow direct database queries in uninstall.php for cleanup -->
<exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery"/>
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching"/>
</rule>
<!-- Set text domain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="{{textdomain}}"/>
</property>
</properties>
</rule>
<!-- Set minimum PHP version -->
<config name="minimum_supported_wp_version" value="6.5"/>
<config name="testVersion" value="8.0-"/>
</ruleset>