-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.phpcs.xml.dist
More file actions
113 lines (101 loc) · 4.13 KB
/
Copy path.phpcs.xml.dist
File metadata and controls
113 lines (101 loc) · 4.13 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?xml version="1.0"?>
<ruleset name="CiteCue">
<description>WordPress coding standards for the CiteCue plugin.</description>
<file>.</file>
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<arg name="extensions" value="php"/>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="parallel" value="4"/>
<arg value="sp"/>
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs"/>
<!-- The plugin ships as plain PHP with a 7.4 floor. -->
<config name="testVersion" value="7.4-"/>
<rule ref="PHPCompatibilityWP"/>
<config name="minimum_wp_version" value="5.8"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="citecue-ai-auto-fix"/>
</property>
</properties>
</rule>
<!--
The identifier prefix is not the text domain: the text domain has to
match the WordPress.org slug, hyphens and all, while a PHP class,
function or constant name cannot contain a hyphen.
-->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="citecue"/>
<element value="CITECUE"/>
</property>
</properties>
</rule>
<!--
The DONOTCACHEPAGE exemption is not here. It lives on the two define()
calls as phpcs:ignore annotations, because an exclusion written here
only applies to this ruleset — Plugin Check runs its own, and reports
the constant to the reviewer. An annotation travels with the code and
is the route Plugin Check documents for a false positive.
-->
<!-- "llms.txt" is a filename and stays lowercase in prose. -->
<rule ref="Generic.Commenting.DocComment.ShortNotCapital">
<exclude-pattern>/includes/class-citecue-llms-txt\.php</exclude-pattern>
</rule>
<!-- The standard directory-listing guard file. -->
<rule ref="Squiz.Commenting.FileComment.WrongStyle">
<exclude-pattern>/includes/index\.php</exclude-pattern>
</rule>
<!--
Test files are not shipped: they legitimately reassign WordPress
globals, declare unprefixed test classes, and carry docblocks that hold
only PHPUnit annotations (@covers, @dataProvider).
The local rig (`bin/rig/*`, driven by `bin/local-rig.sh`) is the same
category and then some. It is not shipped — `bin/` is export-ignored and
the zip guard refuses an archive containing it — and it is not plugin
code: these are standalone scripts that install a throwaway WordPress,
seed it and assert against rendered pages. Two of them do not run inside
WordPress at all. Prefixing a local `$url` in a test harness with
`citecue_` would be ceremony that makes the harness harder to read
without making anything safer. Everything the sniffs flag there that IS
worth fixing — missing docblocks, short ternaries — is fixed rather than
excused; only these four categories are waived.
-->
<rule ref="WordPress.WP.GlobalVariablesOverride">
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/bin/rig/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/bin/rig/*</exclude-pattern>
</rule>
<rule ref="WordPress.PHP.DevelopmentFunctions">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName">
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/bin/rig/*</exclude-pattern>
</rule>
<!-- PHPUnit calls assertion helpers in camelCase. -->
<rule ref="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid">
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<!--
The sniff reads a docblock that directly precedes a require as
documentation for that statement rather than for the file. The bootstrap
has to require the autoloader first, so it can never satisfy both.
-->
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>/tests/bootstrap\.php</exclude-pattern>
</rule>
</ruleset>