forked from DevinVinson/WordPress-Plugin-Boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 8
/
phpcs.xml
106 lines (98 loc) · 4.26 KB
/
phpcs.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>
<rule ref="WordPress" />
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<file>.</file>
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<!-- Show colors -->
<arg name="colors"/>
<exclude-pattern>/assets/</exclude-pattern>
<exclude-pattern>/dist-archive/</exclude-pattern>
<exclude-pattern>/node_modules/</exclude-pattern>
<exclude-pattern>/scratch/</exclude-pattern>
<exclude-pattern>/tests/_data/</exclude-pattern>
<exclude-pattern>/tests/_output/</exclude-pattern>
<exclude-pattern>/tests/_support/</exclude-pattern>
<exclude-pattern>/tests/_wpenv/</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/vendor-prefixed/*</exclude-pattern>
<exclude-pattern>/wordpress/</exclude-pattern>
<exclude-pattern>/wp-content/</exclude-pattern>
<!-- Don't suggest WordPress functions during unit tests -->
<rule ref="WordPress.WP.AlternativeFunctions">
<exclude-pattern>*/tests/unit/*</exclude-pattern>
</rule>
<!-- Enforce fewer rules on tests -->
<rule ref="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Internal.NoCodeFound">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="PEAR.NamingConventions.ValidClassName.Invalid">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<exclude-pattern>*/tests/acceptance/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment.Missing">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.EmptyThrows">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.PHP.DisallowMultipleAssignments.Found">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.DB.DirectDatabaseQuery.DirectQuery">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.DB.DirectDatabaseQuery.NoCaching">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.DB.DirectDatabaseQuery.SchemaChange">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.NotHyphenatedLowercase">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid">
<exclude-pattern>*/tests/acceptance/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase">
<exclude-pattern>*/tests/acceptance/*</exclude-pattern>
</rule>
<rule ref="WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.NonceVerification.Recommended">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput.InputNotValidated">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput.InputNotSanitized">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput.MissingUnslash">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.GlobalVariablesOverride.Prohibited">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
</ruleset>