-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathphpcs.xml.dist
58 lines (47 loc) · 2.46 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
<?xml version="1.0"?>
<ruleset name="AR/WP/Plugin ruleset">
<description>Custom ruleset for AR/WP/Plugins</description>
<!-- Show progress in all reports. -->
<arg value="p"/>
<!-- A path to strip from the front of file paths inside reports. -->
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<!-- Exclude the Composer Vendor directory. -->
<exclude-pattern>/vendor/*</exclude-pattern>
<!-- Exclude the Node Modules directory. -->
<exclude-pattern>/node_modules/*</exclude-pattern>
<!-- Set minimum supported WordPress version -->
<config name="minimum_supported_wp_version" value="5.3"/>
<!-- Check for PHP cross-version compatibility. -->
<config name="testVersion" value="5.6-"/>
<rule ref="PHPCompatibilityWP"/>
<!-- Include the WordPress standard. -->
<rule ref="WordPress-Extra">
<!-- Use PSR-4 file naming standard instead -->
<exclude name="WordPress.Files.FileName"/>
<!-- Allow short array syntax -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<!-- Allow global variable override -->
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited"/>
<!-- Temporarily exclude rules -->
<!-- ** Audit-usage ** -->
<exclude name="Squiz.PHP.Eval.Discouraged"/>
<exclude name="Squiz.Scope.MethodScope.Missing"/>
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
<exclude name="PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.Changed"/>
<exclude name="PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection"/>
<exclude name="WordPress.Security.NonceVerification.Missing"/>
<exclude name="WordPress.Security.NonceVerification.Recommended"/>
<!-- ** WordPress-Specific ** -->
<exclude name="WordPress.DB.PreparedSQL.InterpolatedNotPrepared"/>
<exclude name="WordPress.DB.PreparedSQL.NotPrepared"/>
<exclude name="WordPress.PHP.DontExtract.extract_extract"/>
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/>
</rule>
<!-- Add in some extra rules from other standards. -->
<!-- <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/> -->
<!-- <rule ref="Generic.Commenting.Todo"/> -->
<rule ref="Squiz.Commenting.FunctionComment.SpacingAfter"/>
</ruleset>