-
Notifications
You must be signed in to change notification settings - Fork 135
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
51 lines (41 loc) · 2.34 KB
/
phpcs.xml.dist
File metadata and controls
51 lines (41 loc) · 2.34 KB
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
<?xml version="1.0"?>
<ruleset name="Custom ruleset for Edit Flow">
<config name="minimum_supported_wp_version" value="6.4"/>
<rule ref="WordPress-Extra"/>
<rule ref="WordPress-VIP-Go">
<!-- These disallow anonymous functions as action callbacks -->
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
<!-- Allow short array syntax -->
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
<!-- Do not enforce 'class-' prefix -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<!-- Allow short ternaries -->
<exclude name="WordPress.PHP.DisallowShortTernary.Found" />
<!-- Generates too many false positives -->
<exclude name="WordPress.WP.CapitalPDangit.Misspelled" />
<!-- We use trigger_error extensively -->
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_trigger_error" />
<!-- ToDo: Remove these exceptions overttime -->
<!-- These are for legacy reasons, as EditFlow's main file cannot be altered -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed" />
<exclude name="PEAR.NamingConventions.ValidClassName.StartWithCapital" />
<exclude name="PEAR.NamingConventions.ValidClassName.Invalid" />
<!-- Allow not returning after the setup theme filter for now -->
<exclude name="WordPressVIPMinimum.Hooks.AlwaysReturnInFilter.MissingReturnStatement" />
<!-- Localization is done in a legacy manner in some places, and its ben left as is for now -->
<exclude name="WordPress.WP.I18n.InterpolatedVariableSingular" />
<exclude name="WordPress.WP.I18n.InterpolatedVariablePlural" />
<exclude name="WordPress.WP.I18n.MissingSingularPlaceholder" />
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralText" />
<!-- This rule is hard to solve given the heavy use of JS in the PHP code right now -->
<exclude name="Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure" />
<exclude name="WordPress.DateTime.RestrictedFunctions.date_date" />
</rule>
<file>.</file>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
</ruleset>