This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
forked from grappler/ns-theme-check
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathphpcs.xml.dist
59 lines (49 loc) · 1.97 KB
/
phpcs.xml.dist
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
<?xml version="1.0"?>
<ruleset name="WordPress Theme Sniffer">
<description>Coding standard for the WordPress Theme Sniffer plugin.</description>
<!-- Check the entire plugin. -->
<file>.</file>
<!-- Exclude patterns. -->
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/bin/*</exclude-pattern>
<exclude-pattern>*/assets/*</exclude-pattern>
<exclude-pattern>/src/CompiledContainer.php</exclude-pattern>
<!-- Additional arguments. -->
<arg value="sp" />
<arg name="basepath" value="." />
<arg name="parallel" value="8" />
<arg name="cache" />
<arg name="extensions" value="php" />
<!-- Include the WordPress rulesets. -->
<rule ref="WordPress-Extra" />
<rule ref="WordPress-Docs" />
<!-- Handle array alignments. -->
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
<properties>
<property name="alignMultilineItems" value="!=100" />
</properties>
</rule>
<!-- Don't use Yoda conditions, they are not useful. -->
<rule ref="WordPress.PHP">
<exclude name="WordPress.PHP.YodaConditions" />
</rule>
<!-- Ignore flagging file_get_contents as 'evil' -->
<rule ref="WordPress.WP.AlternativeFunctions">
<exclude name="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents" />
</rule>
<!-- Allow multiple parameters on one line for multi-line function calls. -->
<rule ref="PEAR.Functions.FunctionCallSignature">
<properties>
<property name="allowMultipleArguments" value="true" />
</properties>
</rule>
<!-- Improve code readability by allowing the arguments after function call. -->
<rule ref="PEAR.Functions.FunctionCallSignature">
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
</rule>
<!-- Set the minimum version to check against in the PHPcompatibility. -->
<config name="testVersion" value="7.0-" />
<rule ref="PHPCompatibility" />
</ruleset>