-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathphpcs.ruleset.xml
More file actions
84 lines (69 loc) · 2.78 KB
/
Copy pathphpcs.ruleset.xml
File metadata and controls
84 lines (69 loc) · 2.78 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
<?xml version="1.0"?>
<ruleset name="Colorlib Login Customizer Coding Standards">
<description>Coding standards for Colorlib Login Customizer WordPress plugin.</description>
<!-- Scan these files -->
<file>.</file>
<!-- Exclude patterns -->
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/.git/*</exclude-pattern>
<exclude-pattern>/assets/js/jquery.minicolors*</exclude-pattern>
<!-- Show progress and sniff codes -->
<arg value="sp"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<!-- WordPress Coding Standards -->
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
</rule>
<!-- WordPress VIP coding standards (security) -->
<rule ref="WordPress-Extra"/>
<!-- PHP Compatibility -->
<rule ref="PHPCompatibilityWP"/>
<!-- PHP version compatibility -->
<config name="testVersion" value="8.0-"/>
<!-- Minimum WordPress version -->
<config name="minimum_wp_version" value="6.0"/>
<!-- Text domain for i18n -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="colorlib-login-customizer"/>
</property>
</properties>
</rule>
<!-- Allow short array syntax -->
<rule ref="Generic.Arrays.DisallowShortArraySyntax.Found">
<severity>0</severity>
</rule>
<!--
Intentional-pattern exclusions. These flag deliberate, working conventions
rather than defects, so they are silenced project-wide. Reviewed 2026-06-19.
-->
<!-- WordPress hook callbacks (e.g. the `gettext` filters) must accept the full
argument list even when not every argument is used in the body. -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<severity>0</severity>
</rule>
<!-- WordPress option/setting values are loosely typed (a stored "2" vs an int
default 2), so forcing strict comparisons here would risk changing behaviour.
Comparisons are reviewed case-by-case instead. -->
<rule ref="Universal.Operators.StrictComparisons">
<severity>0</severity>
</rule>
<!-- The plugin follows the long-standing WP plugin-boilerplate convention of
underscore-prefixed members ($_instance, $_version, $_token, _set_*(), etc.).
These are public/referenced across files; renaming would break the API. -->
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
<severity>0</severity>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<severity>0</severity>
</rule>
<!-- Descriptive parameter names ($parent, $class, $default) mirror WordPress core
naming and are clearer than the suggested alternatives. -->
<rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames">
<severity>0</severity>
</rule>
</ruleset>