-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
56 lines (47 loc) · 1.89 KB
/
phpcs.xml.dist
File metadata and controls
56 lines (47 loc) · 1.89 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="WPKit Coding Standards">
<description>PHP CodeSniffer rules for wedevs/wp-kit.</description>
<!-- Scan these directories -->
<file>src</file>
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="."/>
<!-- Check for cross-version support for PHP 7.4 and higher. -->
<config name="testVersion" value="7.4-"/>
<!-- WordPress Coding Standards -->
<rule ref="WordPress">
<!-- Allow short array syntax -->
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
<!-- Allow PSR-4 file naming for classes -->
<exclude name="WordPress.Files.FileName"/>
<!-- Allow namespaced code -->
<exclude name="WordPress.NamingConventions.PrefixAllGlobals"/>
</rule>
<!--
Suppress direct DB and prepared SQL warnings for the query builder.
BaseDataStore builds SQL safely via $wpdb->prepare() internally.
-->
<rule ref="WordPress.DB.DirectDatabaseQuery">
<exclude-pattern>src/DataLayer/DataStore/BaseDataStore\.php</exclude-pattern>
<exclude-pattern>src/Migration/Schema\.php</exclude-pattern>
</rule>
<rule ref="WordPress.DB.PreparedSQL">
<exclude-pattern>src/DataLayer/DataStore/BaseDataStore\.php</exclude-pattern>
</rule>
<rule ref="WordPress.DB.PreparedSQLPlaceholders">
<exclude-pattern>src/DataLayer/DataStore/BaseDataStore\.php</exclude-pattern>
</rule>
<!-- Allow reserved keyword parameter names (e.g. $namespace, $object, $class) -->
<rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames">
<severity>0</severity>
</rule>
<!-- Allow unused parameters in filter/action callbacks and REST handlers -->
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<severity>0</severity>
</rule>
<!-- PHPCompatibility -->
<rule ref="PHPCompatibilityWP"/>
</ruleset>