-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
80 lines (69 loc) · 2.63 KB
/
Copy pathphpcs.xml
File metadata and controls
80 lines (69 loc) · 2.63 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
79
80
<?xml version="1.0"?>
<ruleset name="CHIP for Formidable Forms">
<description>PHPCS ruleset for the CHIP for Formidable Forms plugin.</description>
<!-- What to scan -->
<file>.</file>
<!-- Only scan PHP files -->
<arg name="extensions" value="php"/>
<!-- Exclude paths -->
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/tests/*</exclude-pattern>
<!-- Use WordPress coding standards -->
<rule ref="WordPress">
<!-- The plugin ships a single short file of inline admin markup; class
file naming and template indentation rules add noise without value. -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
</rule>
<!-- Set minimum supported versions -->
<config name="minimum_supported_wp_version" value="6.3"/>
<config name="testVersion" value="7.4-8.5"/>
<!-- Text domain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="chip-for-formidable-forms"/>
</property>
</properties>
</rule>
<rule ref="WordPress.WP.Capabilities">
<properties>
<!-- Formidable registers these; they are not ours to rename. -->
<property name="custom_capabilities" type="array">
<element value="frm_view_entries"/>
<element value="frm_change_settings"/>
<element value="frm_view_forms"/>
<element value="frm_edit_entries"/>
</property>
</properties>
</rule>
<!-- Prefixes. Formidable's own hooks are also allowed where this plugin
extends the core payment action, since they are not ours to rename. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="frm_chip"/>
<element value="FrmChip"/>
<element value="FRM_CHIP"/>
<element value="CHIP_FRM"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound">
<!-- This helper deliberately hooks Formidable's own field-options filter
so embedded-form fields are offered, exactly as core does. -->
<exclude-pattern>includes/helpers/class-chip-helper.php</exclude-pattern>
</rule>
<!-- Hook callbacks must accept the full filter signature even when a
parameter is not used, so unused parameters are expected here. -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter"/>
</rule>
<!-- Line length -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
</ruleset>