-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
phpcs.ruleset.xml
executable file
·77 lines (61 loc) · 2.95 KB
/
phpcs.ruleset.xml
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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for theme/plugin">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset -->
<!-- See https://github.com/WordPress/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<!-- Set a description for this ruleset. -->
<description>Custom rules of WordPress Coding Standards for theme/plugin</description>
<!-- Default tab width for indentation fixes and such. -->
<arg name="tab-width" value="4"/>
<!--
If no files or directories are specified on the command line
your custom standard can specify what files should be checked
instead.
Note that file and directory paths specified in a ruleset are
relative to the ruleset's location, and that specifying any file or
directory path on the command line will ignore all file tags.
-->
<file>.</file>
<!--
You can hard-code ignore patterns directly into your
custom standard so you don't have to specify the
patterns on the command line.
The following two tags are equivalent to the command line argument:
\-\-ignore=*/tests/*,*/data/*
-->
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<!-- Annotated Ruleset https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset -->
<arg name="extensions" value="php"/>
<arg name="colors"/>
<arg value="sp"/>
<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress.WP.I18n">
<properties>
<!-- Value: replace the text domain used. -->
<property name="text_domain" type="array" value="multi-device-switcher" />
</properties>
</rule>
<rule ref="WordPress">
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace" />
<exclude name="WordPress.Arrays.ArrayDeclaration.NoComma" />
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
<exclude name="Squiz.Commenting.VariableComment.Missing" />
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment" />
<exclude name="Squiz.Commenting.BlockComment.NoEmptyLineBefore" />
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
<exclude name="Squiz.Commenting.InlineComment.SpacingAfter" />
<exclude name="Squiz.Commenting.ClassComment" />
<exclude name="Squiz.Commenting.FunctionComment" />
<exclude name="Generic.Commenting.DocComment" />
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
</rule>
<rule ref="PHPCompatibilityWP">
<config name="testVersion" value="5.6-"/>
</rule>
</ruleset>