-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
70 lines (70 loc) · 2.74 KB
/
Copy pathphpcs.xml
File metadata and controls
70 lines (70 loc) · 2.74 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
<?xml version="1.0"?>
<ruleset name="Keel">
<description>WordPress Coding Standards.</description>
<file>keel.php</file>
<file>includes</file>
<file>tests</file>
<exclude-pattern>vendor/*</exclude-pattern>
<arg name="extensions" value="php" />
<arg name="parallel" value="8" />
<rule ref="WordPress" />
<!--
tests/ are standalone CLI scripts, not WordPress runtime code. They stub
WordPress functions, define small helper classes and globals, and report
through STDOUT/STDERR to exercise the plugin with no WP loaded. The sniffs
below target shipped runtime code — docblocks, output escaping, global
overrides, class-file naming, function/OO separation, filesystem APIs — and
do not apply to test scaffolding, so they are relaxed for tests/ only. The
code-correctness sniffs still run against the tests.
-->
<rule ref="WordPress.WP.AlternativeFunctions.file_system_operations_fwrite">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.VariableComment">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.InlineComment">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Universal.Files.SeparateFunctionsFromOO">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<!--
includes/bootstrap.php defines two tiny drop-in XML-RPC server classes inline
inside the wp_xmlrpc_server_class filter (they must be defined where they are
conditionally registered), so the class-per-file and class-based-filename
rules do not apply to it. Test files likewise define small stub classes.
-->
<rule ref="Generic.Files.OneObjectStructurePerFile">
<exclude-pattern>includes/bootstrap.php</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName">
<exclude-pattern>includes/bootstrap.php</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
</rule>
</ruleset>