-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
78 lines (64 loc) · 2.29 KB
/
phpcs.xml.dist
File metadata and controls
78 lines (64 loc) · 2.29 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
74
75
76
77
78
<?xml version="1.0"?>
<ruleset name="Betterlytics WordPress Plugin Coding Standards">
<description>A custom set of code standard rules for Betterlytics WordPress plugin.</description>
<!-- What to scan -->
<file>.</file>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="1"/> <!-- Disable parallel processing to prevent hangs -->
<!-- Exclude paths -->
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/build/*</exclude-pattern>
<exclude-pattern>/.git/*</exclude-pattern>
<!-- Rules: WordPress Coding Standards -->
<rule ref="WordPress">
<!-- Allow short array syntax -->
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
</rule>
<!-- Rules: WordPress Extra -->
<rule ref="WordPress-Extra">
<!-- Normalize whitespace before/after opening braces -->
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing"/>
</rule>
<!-- Rules: WordPress Docs -->
<rule ref="WordPress-Docs"/>
<!-- Rules: PHP Compatibility -->
<rule ref="PHPCompatibilityWP"/>
<!-- Set minimum supported PHP version -->
<config name="testVersion" value="7.4-"/>
<!-- Set minimum supported WordPress version -->
<config name="minimum_wp_version" value="6.0"/>
<!-- WordPress text domain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="betterlytics"/>
</property>
</properties>
</rule>
<!-- Verify that all gettext calls use the correct text domain -->
<rule ref="WordPress.WP.I18n.MissingTranslatorsComment">
<type>warning</type>
</rule>
<!-- Allow short array syntax for modern PHP -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<!-- Prefixes for all globals -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="betterlytics"/>
<element value="Betterlytics"/>
<element value="BETTERLYTICS"/>
</property>
</properties>
</rule>
<!-- Allow plugin file naming -->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
</rule>
</ruleset>