-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
86 lines (74 loc) · 3.36 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
86 lines (74 loc) · 3.36 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
81
82
83
84
85
86
<?xml version="1.0"?>
<ruleset name="SLASHED for WP">
<description>WordPress coding standards for the SLASHED for WordPress plugin.</description>
<!-- What to scan. -->
<file>SLASHED-for-WP</file>
<!-- Generated / vendored / build output: never our code to lint. -->
<exclude-pattern>*/dist/*</exclude-pattern>
<exclude-pattern>*/data/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<!-- Only PHP. -->
<arg name="extensions" value="php"/>
<!-- Show sniff codes, colour, parallel, progress dots. -->
<arg name="colors"/>
<arg value="sp"/>
<arg name="parallel" value="8"/>
<arg name="basepath" value="."/>
<!-- Full WordPress coding standard (Core + Extra) plus cross-version
PHP compatibility for the plugin's declared PHP 7.4 floor. -->
<rule ref="WordPress-Extra"/>
<rule ref="PHPCompatibilityWP"/>
<config name="testVersion" value="7.4-"/>
<!-- Plugin conventions for the i18n / prefix / capability sniffs.
Each integration ships as its own standalone plugin with a matching
text domain, while the shared code uses 'slashed'; all three are valid. -->
<config name="text_domain" value="slashed,slashed-bricks,slashed-gutenberg"/>
<!-- Class files follow the project's `class-{short-name}.php` convention
(e.g. class-admin.php for Slashed_Admin) rather than deriving the file
name from the fully-prefixed class name. The lowercase-hyphenated file
name rule (NotHyphenatedLowercase) still applies. -->
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<severity>0</severity>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="slashed"/>
<element value="SLASHED"/>
<element value="Slashed"/>
</property>
</properties>
</rule>
<!-- Custom capabilities: WordPress core's manage_options plus Bricks
builder's own bricks_full_access capability, both used in cap checks. -->
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<element value="manage_options"/>
<element value="bricks_full_access"/>
</property>
</properties>
</rule>
<!-- Hook names use the `slashed/...` namespacing convention, so allow the
slash and hyphen as word delimiters rather than forcing underscores. -->
<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="/-"/>
</properties>
</rule>
<!-- `$var` is used pervasively as an idiomatic loop/parameter name. The
"reserved keyword" here is the obsolete `var` property keyword, not a
real conflict, so this advisory naming sniff is disabled. -->
<rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames">
<severity>0</severity>
</rule>
<!-- WordPress hook/filter callbacks must keep their full signature even when
a parameter is unused, so this is noise rather than a real defect. -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<severity>0</severity>
</rule>
<!-- Advisory warnings (object-cache hints, etc.) inform but don't fail the
build; only errors block a merge. -->
<config name="ignore_warnings_on_exit" value="1"/>
</ruleset>