This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
phpcs.xml
70 lines (57 loc) · 2.59 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
<?xml version="1.0"?>
<ruleset>
<description>Coding standards for the WPBuildHooks plugin</description>
<!-- Show progress and sniff codes in all reports. -->
<arg value="ps"/>
<!-- A path to strip from the front of file paths inside reports. -->
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<!-- Run the lints in parallel so they run faster. This will separate the files into 20 chunks to be linted -->
<arg name="parallel" value="20"/>
<!-- Includes -->
<file>includes</file>
<file>wp-build-hooks.php</file>
<!-- Rules -->
<rule ref="WordPress-Core">
<!-- Definitely should not be added back -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<exclude name="WordPress.PHP.DisallowShortTernary.Found"/>
<exclude name="WordPress.CodeAnalysis.AssignmentInCondition.Found"/>
<!-- Should probably not be added back -->
<exclude name="PHPCompatibility.Keywords.ForbiddenNamesAsDeclared.objectFound"/>
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
<exclude name="Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure"/>
<exclude name="WordPress.DateTime.RestrictedFunctions.date_date"/>
<!-- Should maybe Add Back Later -->
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment"/>
<exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"/>
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine"/>
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments"/>
<exclude name="WordPress.NamingConventions.ValidVariableName" />
<exclude name="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents" />
</rule>
<!-- WordPress coding standards. -->
<rule ref="WordPress" />
<!-- Tests for inline documentation of code -->
<rule ref="WordPress-Docs">
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="WordPress.Files.FileName" />
<!-- Should be re-enabled -->
<exclude name="Squiz.Commenting"/>
</rule>
<!-- Allow namespaced hook names in dot notation. -->
<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="."/>
</properties>
</rule>
<!-- Check for PHP cross-version compatibility. -->
<rule ref="PHPCompatibilityWP">
<config name="testVersion" value="7.2-"/>
</rule>
<!-- Enforce short array syntax -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
</ruleset>