-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
73 lines (63 loc) · 2.77 KB
/
phpcs.xml.dist
File metadata and controls
73 lines (63 loc) · 2.77 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0"?>
<ruleset name="SureFeedback WordPress Standards">
<description>PHPCS rules for SureFeedback WordPress plugin</description>
<!-- What to scan -->
<file>.</file>
<!-- Exclude patterns -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>assets/*</exclude-pattern>
<exclude-pattern>languages/*</exclude-pattern>
<exclude-pattern>release/*</exclude-pattern>
<exclude-pattern>\.github/*</exclude-pattern>
<exclude-pattern>\.wordpress-org/*</exclude-pattern>
<exclude-pattern>src/*</exclude-pattern>
<exclude-pattern>stubs-generator.php</exclude-pattern>
<exclude-pattern>Gruntfile.cjs</exclude-pattern>
<exclude-pattern>*.config.js</exclude-pattern>
<exclude-pattern>*.config.cjs</exclude-pattern>
<exclude-pattern>*.config.ts</exclude-pattern>
<!-- How to scan -->
<arg value="sp"/><!-- Show sniff and progress -->
<arg name="basepath" value="."/><!-- Strip the file paths down to the relevant bit -->
<arg name="colors"/><!-- Show results with colors -->
<arg name="extensions" value="php"/><!-- Limit to PHP files -->
<arg name="parallel" value="8"/><!-- Check up to 8 files simultaneously -->
<!-- Rules: WordPress Coding Standards -->
<config name="minimum_supported_wp_version" value="5.8"/>
<!-- Include WordPress Coding Standards -->
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra"/>
<!-- Verify text domain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="surefeedback-cloud"/>
</property>
</properties>
</rule>
<!-- Verify global namespace prefix -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="surefeedback"/>
<element value="SureFeedback"/>
<element value="SUREFEEDBACK"/>
</property>
</properties>
</rule>
<!-- Allow for theme specific exceptions to the file name rules based on the class names -->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
</rule>
<!-- Enforce PSR-4 autoloading compatibility for class files -->
<rule ref="Generic.Files.OneObjectStructurePerFile"/>
<!-- Allow mixed OO and functions in main plugin file (WordPress convention) -->
<rule ref="Universal.Files.SeparateFunctionsFromOO">
<exclude-pattern>surefeedback-cloud.php</exclude-pattern>
</rule>
</ruleset>