-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
56 lines (48 loc) · 1.8 KB
/
phpcs.xml.dist
File metadata and controls
56 lines (48 loc) · 1.8 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
<?xml version="1.0"?>
<ruleset name="Changelog to Blog Post">
<description>PHP_CodeSniffer ruleset for the Changelog to Blog Post plugin.</description>
<!-- Files to check -->
<file>changelog-to-blog-post.php</file>
<file>uninstall.php</file>
<file>includes/</file>
<!-- Exclusions -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<!-- WordPress Coding Standards -->
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra"/>
<!-- Enforce minimum PHP version -->
<config name="minimum_supported_wp_version" value="6.9"/>
<config name="testVersion" value="8.0-"/>
<!-- Set the correct text domain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="changelog-to-blog-post"/>
</property>
</properties>
</rule>
<!-- Allow short array syntax (PSR-12 / modern PHP convention) -->
<rule ref="Universal.Arrays.DisallowShortArraySyntax">
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<!-- PSR-4 autoloading — class file naming follows namespace, not WP convention -->
<rule ref="WordPress.Files.FileName">
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
</rule>
<!-- Namespaced code — prefix check not needed -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="TenUp\ChangelogToBlogPost"/>
<element value="changelog_to_blog_post"/>
<element value="CHANGELOG_TO_BLOG_POST"/>
<element value="ctbp"/>
</property>
</properties>
</rule>
</ruleset>