-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
81 lines (64 loc) · 2.79 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<description>Apply WordPress Coding Standards to all PHP files.</description>
<!--
#############################################################################
COMMAND LINE ARGUMENTS
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset
#############################################################################
-->
<!-- Only scan PHP files. -->
<arg name="extensions" value="php" />
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next
scan. -->
<arg name="cache" value=".cache/phpcs.json" />
<ini name="memory_limit" value="512M" />
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./" />
<!--
#############################################################################
FILE SELECTION
Set which files will be subject to the scans executed using this ruleset.
#############################################################################
-->
<file>.</file>
<!-- Exclude the build folder in the current directory. -->
<exclude-pattern type="relative">^build/*</exclude-pattern>
<!-- Directories and third party library exclusions. -->
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<!--
#############################################################################
SET UP THE RULESET
#############################################################################
-->
<rule ref="WordPress" />
<!--
#############################################################################
SNIFF-SPECIFIC CONFIGURATION
#############################################################################
-->
<rule ref="WordPress.Files">
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
</rule>
<rule ref="WordPress.PHP">
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_error_log" />
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_print_r" />
</rule>
<rule ref="Generic.Commenting">
<exclude-pattern>tests/</exclude-pattern>
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="Generic.Commenting.DocComment.ParamNotFirst" />
</rule>
<rule ref="Squiz.Commenting">
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
<exclude name="Squiz.Commenting.ClassComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
</rule>
<rule ref="Universal.Arrays">
<exclude name="Universal.Arrays.DisallowShortArraySyntax" />
</rule>
</ruleset>