-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
65 lines (58 loc) · 2.44 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
65 lines (58 loc) · 2.44 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
<?xml version="1.0"?>
<ruleset name="AgenticAdmin">
<description>WordPress Coding Standards for Agentic Admin for WordPress</description>
<file>.</file>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/build-extensions/*</exclude-pattern>
<exclude-pattern>*.js</exclude-pattern>
<exclude-pattern>*.jsx</exclude-pattern>
<exclude-pattern>*.scss</exclude-pattern>
<rule ref="WordPress">
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="agentic-admin"/>
</property>
</properties>
</rule>
<!-- Allowed prefixes for plugin globals (no "wp_" lookalike, per WP.org review).
- agentic_admin: function/hook/option prefix
- AGENTIC_ADMIN: constant prefix
- AgenticAdmin: namespace/class prefix -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="agentic_admin"/>
<element value="AGENTIC_ADMIN"/>
<element value="AgenticAdmin"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound">
<!-- Allow WordPress core variables in uninstall.php (e.g., $sites, $site from get_sites()) -->
<exclude-pattern>uninstall\.php</exclude-pattern>
</rule>
<!-- Allow translation functions without escaping in exception messages -->
<!-- Exception messages are not displayed as HTML, they go to error logs -->
<rule ref="WordPress.Security.EscapeOutput">
<exclude-pattern>includes/functions-abilities\.php</exclude-pattern>
</rule>
<!-- Allow unused $input parameter in ability execute callbacks -->
<!-- Required by WordPress Abilities API signature, even when not used -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<exclude-pattern>includes/abilities/*</exclude-pattern>
</rule>
<!-- Main plugin file naming convention - not a class file -->
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>agentic-admin\.php</exclude-pattern>
</rule>
<!-- Allow direct database calls in database optimization utility -->
<!-- This is intentional - we're optimizing tables directly -->
<rule ref="WordPress.DB.DirectDatabaseQuery">
<exclude-pattern>includes/abilities/db-optimize\.php</exclude-pattern>
</rule>
<config name="testVersion" value="8.2-"/>
</ruleset>