-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
60 lines (47 loc) · 2.14 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
60 lines (47 loc) · 2.14 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
<?xml version="1.0"?>
<ruleset name="rtcamp/wp-framework">
<description>PHPCS rules for rtcamp/wp-framework — WordPress-Core + Extra + Docs + VIP Minimum + PHP 8.2+ compatibility.</description>
<!-- What to scan. Production source only; tests are exercised by PHPUnit. -->
<file>inc</file>
<!-- Ignore vendor + build artifacts -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/build/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<!-- Runtime options -->
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="parallel" value="8"/>
<arg name="extensions" value="php"/>
<arg value="sp"/>
<!-- Target PHP version for compatibility checks (matches composer.json floor). -->
<config name="testVersion" value="8.2-"/>
<!-- Minimum WordPress version for deprecated-function checks -->
<config name="minimum_wp_version" value="6.5"/>
<!-- WordPress Coding Standards -->
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Extra"/>
<rule ref="WordPress-Docs"/>
<!-- VIP Minimum — hosting-grade checks (avoid transients, discourage get_posts in loops, etc.) -->
<rule ref="WordPressVIPMinimum"/>
<!-- PHP 8.3 compatibility -->
<rule ref="PHPCompatibilityWP"/>
<!-- Package-specific overrides -->
<!-- This package has no text domain of its own — consumers supply theirs.
Suppress the missing-text-domain check for strings we don't translate. -->
<rule ref="WordPress.WP.I18n">
<exclude name="WordPress.WP.I18n.MissingArgDomain"/>
</rule>
<!-- Allow short ternary (?:) — modern PHP idiom. -->
<rule ref="Universal.Operators.DisallowShortTernary">
<severity>0</severity>
</rule>
<!-- Allow short array syntax [] — modern PHP idiom. -->
<rule ref="Universal.Arrays.DisallowShortArraySyntax">
<severity>0</severity>
</rule>
<!-- PSR-4 autoloading requires PascalCase filenames — disable WP filename rules. -->
<rule ref="WordPress.Files.FileName">
<severity>0</severity>
</rule>
</ruleset>