-
Notifications
You must be signed in to change notification settings - Fork 55
/
phpcs.xml
58 lines (45 loc) · 2.2 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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<description>MainWP Child dev PHP_CodeSniffer ruleset.</description>
<!-- Check all PHP files in directory tree by default. -->
<file>.</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/bin/*</exclude-pattern>
<exclude-pattern>*/.github/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>libs/</exclude-pattern>
<arg value="sp" />
<arg name="extensions" value="php" />
<arg name="basepath" value="." />
<arg name="parallel" value="8" />
<!-- Configs -->
<config name="minimum_supported_wp_version" value="5.2" />
<!-- Rules -->
<rule ref="WordPress">
<exclude name="WordPress.NamingConventions.ValidVariableName" />
<exclude name="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition" />
<!-- Disable Strict comparison in array check. Not applicable in the mojority of cases. -->
<exclude name="WordPress.PHP.StrictInArray" />
<exclude name="WordPress.WP.I18n" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching" />
<exclude name="Universal.ControlStructures.DisallowAlternativeSyntax.FoundIfWithInlineHTML" />
<exclude name="Universal.ControlStructures.DisallowAlternativeSyntax.FoundForeachWithInlineHTML" />
<exclude name="Universal.ControlStructures.DisallowAlternativeSyntax.FoundIf" />
<exclude name="Universal.ControlStructures.IfElseDeclaration.NoNewLine" />
<exclude name="Universal.Classes.RequireFinalClass.NonFinalClassFound" />
<exclude name="Universal.Namespaces.EnforceCurlyBraceSyntax.Forbidden" />
<exclude name="Generic.Commenting.Todo" />
<exclude name="Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition" />
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch" />
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent" />
<exclude name="WordPress.WP.CapitalPDangit.Misspelled" />
</rule>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="false"/>
</properties>
</rule>
<rule ref="Generic.WhiteSpace.DisallowTabIndent" />
</ruleset>