-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml
108 lines (98 loc) · 5.28 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0"?>
<ruleset name="AWPCP">
<arg value="s" />
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>bin/*</exclude-pattern>
<exclude-pattern>stubs.php</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>build/*</exclude-pattern>
<rule ref="WordPress">
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" />
<exclude name="Generic.Commenting.DocComment" />
<exclude name="Generic.Files.LineEndings.InvalidEOLChar" />
<exclude name="Squiz.Commenting.FunctionComment" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
<exclude name="Squiz.Commenting.VariableComment" />
<exclude name="Squiz.Commenting.ClassComment" />
<exclude name="Squiz.Commenting.FileComment" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="Squiz.Commenting.BlockComment" />
<exclude name="Squiz.Commenting.FunctionCommentThrowTag.Missing" />
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
<exclude name="PEAR.NamingConventions.ValidClassName" />
<!-- Temporary exclusions -->
<exclude name="WordPress.WP.Capabilities.RoleFound" />
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket" />
<exclude name="PEAR.Files.IncludingFile.BracketsNotRequired" />
<exclude name="NormalizedArrays.Arrays.ArrayBraceSpacing" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="Squiz.ControlStructures.ControlSignature" />
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing" />
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction" />
<exclude name="Squiz.PHP.EmbeddedPhp" />
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing" />
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter" />
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore" />
<exclude name="WordPress.WhiteSpace.OperatorSpacing.SpacingBefore" />
<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing" />
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing" />
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions" />
<exclude name="Generic.Functions.FunctionCallArgumentSpacing" />
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited" />
<exclude name="WordPress.PHP.DontExtract.extract_extract" />
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed" />
<exclude name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
<exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase" />
<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired" />
<exclude name="Squiz.Commenting.InlineComment" />
</rule>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4" />
<property name="tabIndent" value="false" />
</properties>
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
</rule>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="WordPress.Arrays.ArrayIndentation">
<properties>
<property name="tabIndent" value="false" />
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="another-wordpress-classifieds-plugin" />
</property>
</properties>
</rule>
<rule ref="WordPress.Security.EscapeOutput">
<properties>
<property name="customAutoEscapedFunctions" type="array">
<element value="awpcp_esc_attr" />
<element value="awpcp_esc_textarea" />
<element value="wp_nonce_url" />
<element value="awpcp_print_error" />
<element value="awpcp_print_message" />
<element value="awpcp_render_info_message" />
<element value="awpcp_render_error_message" />
<element value="awpcp_render_warning" />
<element value="awpcp_render_categories_dropdown_options" />
<element value="awpcp_html_hidden_fields" />
<element value="awpcp_html_attributes" />
</property>
</properties>
</rule>
<!-- Check for cross-version support for PHP 5.6 and higher. -->
<config name="testVersion" value="5.6-"/>
</ruleset>