-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
89 lines (79 loc) · 4.53 KB
/
Copy pathphpcs.xml
File metadata and controls
89 lines (79 loc) · 4.53 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
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
<?xml version="1.0"?>
<ruleset name="merchi">
<description>merchi</description>
<!-- Scan all files in directory -->
<file>.</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/wc-api-php-master/*</exclude-pattern>
<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>
<!-- Show colors in console -->
<arg value="-colors"/>
<!-- Show sniff codes in all reports -->
<arg value="ns"/>
<!-- Include the WordPress-Extra standard. -->
<rule ref="WordPress-Extra">
<exclude name="WordPress.PHP.DisallowShortTernary"/>
<exclude name="WordPress.WP.EnqueuedResourceParameters.MissingVersion"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid"/>
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis"/>
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis"/>
<exclude name="WordPress.WhiteSpace.OperatorSpacing"/>
</rule>
<rule ref="Squiz">
<exclude name="Squiz.Files.FileExtension.ClassFound"/>
<exclude name="Squiz.PHP.DisallowComparisonAssignment.AssignedComparison"/>
<exclude name="Squiz.WhiteSpace.FunctionSpacing.BeforeFirst"/>
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/>
<exclude name="Squiz.Commenting.FileComment.Missing"/>
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag"/>
<exclude name="Squiz.Commenting.FunctionComment.Missing"/>
<exclude name="Squiz.Commenting.FunctionComment.MissingReturnType"/>
<exclude name="Squiz.Commenting.VariableComment.Missing"/>
<exclude name="Squiz.Operators.ComparisonOperatorUsage.NotAllowed"/>
<exclude name="Squiz.Operators.ComparisonOperatorUsage.ImplicitTrue"/>
<exclude name="Squiz.PHP.GlobalKeyword.NotAllowed"/>
<exclude name="Squiz.Commenting.FunctionComment.WrongStyle"/>
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/>
<exclude name="Squiz.NamingConventions"/>
<exclude name="Squiz.Classes.ClassFileName.NoMatch"/>
<exclude name="Squiz.Classes.ClassDeclaration.OpenBraceNewLine"/>
<exclude name="Squiz.Commenting.ClassComment.Missing"/>
<exclude name="Squiz.WhiteSpace.FunctionSpacing.AfterLast"/>
<exclude name="Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeClose"/>
<exclude name="Squiz.NamingConventions.ValidVariableName.NotCamelCaps"/>
<exclude name="Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps"/>
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
<exclude name="Squiz.PHP.DisallowInlineIf.Found"/>
</rule>
<rule ref="PEAR">
<exclude name="PEAR.ControlStructures.MultiLineCondition.SpacingAfterOpenBrace" />
<exclude name="PEAR.Functions.FunctionDeclaration.BraceOnSameLine" />
<exclude name="PEAR.Commenting" />
<exclude name="PEAR.Functions.FunctionDeclaration.BraceOnSameLine" />
<exclude name="PEAR.NamingConventions" />
<exclude name="PEAR.Classes.ClassDeclaration.OpenBraceNewLine" />
</rule>
<rule ref="WordPress-Docs"/>
<rule ref="Generic">
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed" />
<exclude name="Generic.PHP.ForbiddenFunctions.Found" />
<exclude name="Generic.Formatting.SpaceAfterNot.Incorrect" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="Generic.Files.EndFileNoNewline.Found" />
<exclude name="Generic.Files.InlineHTML.Found" />
<exclude name="Generic.PHP.ClosingPHPTag.NotFound" />
<exclude name="Generic.NamingConventions.CamelCapsFunctionName.NotCamelCaps" />
<exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine" />
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="Generic.PHP.UpperCaseConstant.Found" />
<exclude name="Generic.Files.LowercasedFilename.NotFound" />
</rule>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.Commenting.Todo"/>
<config name="minimum_supported_wp_version" value="4.9"/>
</ruleset>