-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.phpcs.xml
More file actions
53 lines (48 loc) · 2.21 KB
/
Copy path.phpcs.xml
File metadata and controls
53 lines (48 loc) · 2.21 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
<?xml version="1.0"?>
<ruleset name="Custom 404 Pro">
<description>Coding standards for Custom 404 Pro</description>
<file>.</file>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<!-- Only lint PHP files; skip JS, CSS, etc. -->
<arg name="extensions" value="php"/>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg value="sp"/>
<!-- Do not fail CI on warnings — only errors count -->
<arg name="warning-severity" value="0"/>
<config name="minimum_supported_wp_version" value="5.0"/>
<rule ref="WordPress-Core">
<!--
Docblocks for all classes/methods/properties are intentionally deferred.
Adding them to the entire codebase is a separate effort.
-->
<exclude name="Squiz.Commenting"/>
<!--
This plugin intentionally uses custom database tables and performs direct queries.
Caching these queries would require significant architectural changes.
Individual queries are annotated with phpcs:ignore where appropriate.
-->
<exclude name="WordPress.DB.DirectDatabaseQuery"/>
<!--
Table names are constructed from $wpdb->prefix and hardcoded strings — never
from user input. The PreparedSQL sniff cannot distinguish this, so it is
excluded at the ruleset level. User-input values are always passed via
$wpdb->prepare() placeholders.
-->
<exclude name="WordPress.DB.PreparedSQL.NotPrepared"/>
<exclude name="WordPress.DB.PreparedSQLPlaceholders"/>
<!--
WP_List_Table uses standard GET parameters (orderby, order, s) for sorting
and search without nonces — this is the established WordPress list table pattern.
-->
<exclude name="WordPress.Security.NonceVerification"/>
</rule>
<rule ref="WordPress-Extra">
<exclude name="Squiz.Commenting"/>
<exclude name="WordPress.DB.DirectDatabaseQuery"/>
<exclude name="WordPress.DB.PreparedSQL.NotPrepared"/>
<exclude name="WordPress.DB.PreparedSQLPlaceholders"/>
<exclude name="WordPress.Security.NonceVerification"/>
</rule>
</ruleset>