Skip to content

Commit d371a50

Browse files
committed
linted
1 parent 7a8bea4 commit d371a50

File tree

1 file changed

+31
-54
lines changed

1 file changed

+31
-54
lines changed

codeat.xml

Lines changed: 31 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@
33
<description>Codeat coding standard.</description>
44
<!-- Only check PHP files. -->
55
<arg name="extensions" value="php"/>
6-
76
<!-- Treat all files as UTF-8. -->
87
<config name="encoding" value="utf-8"/>
9-
108
<!-- Show progress. -->
11-
<arg value="p"/>
12-
13-
<exclude-pattern type="relative">^\.git/*</exclude-pattern>
9+
<arg value="p"/>
10+
<exclude-pattern type="relative">^\.git/*</exclude-pattern>
1411
<exclude-pattern>/vendor/*</exclude-pattern>
1512
<exclude-pattern>/node_modules/*</exclude-pattern>
1613
<exclude-pattern>freemius</exclude-pattern>
1714
<exclude-pattern>*test*</exclude-pattern>
1815
<exclude-pattern>index.php</exclude-pattern>
19-
2016
<!-- Include some specific sniffs -->
2117
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
2218
<rule ref="Generic.Commenting.Todo"/>
@@ -29,16 +25,13 @@
2925
<rule ref="Generic.Commenting.DocComment.ContentAfterOpen"/>
3026
<rule ref="Generic.Commenting.DocComment.SpacingBeforeShort"/>
3127
<rule ref="Generic.Commenting.DocComment.ContentBeforeClose"/>
32-
3328
<!-- Check for PHP Parse errors. -->
3429
<rule ref="Generic.PHP.Syntax"/>
3530
<!-- Check for file encoding problems. -->
3631
<rule ref="Generic.Files.ByteOrderMark"/>
37-
38-
<rule ref="Generic.Commenting.Todo"/>
39-
<rule ref="Generic.Commenting.Fixme"/>
40-
<rule ref="Zend.Files.ClosingTag"/>
41-
32+
<rule ref="Generic.Commenting.Todo"/>
33+
<rule ref="Generic.Commenting.Fixme"/>
34+
<rule ref="Zend.Files.ClosingTag"/>
4235
<rule ref="Squiz.Commenting">
4336
<exclude name="Squiz.Commenting.FileComment.WrongStyle" />
4437
<exclude name="Squiz.Commenting.FileComment.SpacingAfterOpen" />
@@ -51,60 +44,52 @@
5144
<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment" />
5245
<exclude name="Squiz.Commenting.BlockComment.NoEmptyLineBefore" />
5346
</rule>
54-
5547
<rule ref="Squiz.PHP">
5648
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found" />
5749
<exclude name="Squiz.PHP.GlobalKeyword.NotAllowed" />
58-
<exclude name="Squiz.PHP.DisallowBooleanStatement.Found" />
59-
<exclude name="Squiz.PHP.DisallowInlineIf.Found" />
60-
<exclude name="Squiz.PHP.DisallowComparisonAssignment.AssignedComparison" />
61-
<exclude name="Squiz.PHP.ForbiddenFunctions.Found" />
62-
</rule>
63-
64-
<rule ref="Squiz.WhiteSpace.FunctionSpacing" >
65-
<properties>
66-
<property name="spacing" value="1" />
67-
</properties>
68-
</rule>
69-
50+
<exclude name="Squiz.PHP.DisallowBooleanStatement.Found" />
51+
<exclude name="Squiz.PHP.DisallowInlineIf.Found" />
52+
<exclude name="Squiz.PHP.DisallowComparisonAssignment.AssignedComparison" />
53+
<exclude name="Squiz.PHP.ForbiddenFunctions.Found" />
54+
</rule>
55+
<rule ref="Squiz.WhiteSpace.FunctionSpacing" >
56+
<properties>
57+
<property name="spacing" value="1" />
58+
</properties>
59+
</rule>
7060
<rule ref="Squiz.WhiteSpace">
7161
<exclude name="Squiz.Whitespace.CastSpacing.ContainsWhiteSpace" />
7262
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
7363
<exclude name="Squiz.WhiteSpace.FunctionSpacing.Before" />
7464
<exclude name="Squiz.WhiteSpace.FunctionSpacing.After" />
7565
<exclude name="Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeClose" />
76-
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace" />
77-
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace" />
78-
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
79-
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd" />
66+
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace" />
67+
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace" />
68+
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
69+
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd" />
8070
</rule>
81-
8271
<rule ref="PEAR.NamingConventions">
8372
<exclude name="PEAR.NamingConventions.ValidClassName.Invalid" />
8473
<exclude name="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore" />
8574
<exclude name="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps" />
86-
<exclude name="PEAR.NamingConventions.ValidFunctionName.FunctionNoCapital" />
87-
<exclude name="PEAR.NamingConventions.ValidFunctionName.FunctionNameInvalid" />
75+
<exclude name="PEAR.NamingConventions.ValidFunctionName.FunctionNoCapital" />
76+
<exclude name="PEAR.NamingConventions.ValidFunctionName.FunctionNameInvalid" />
8877
</rule>
89-
90-
<rule ref="PEAR.NamingConventions">
78+
<rule ref="PEAR.NamingConventions">
9179
<exclude name="PEAR.NamingConventions.ValidClassName.Invalid" />
9280
<exclude name="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore" />
9381
<exclude name="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore" />
9482
</rule>
95-
9683
<rule ref="PEAR.Files.IncludingFile">
9784
<exclude name="PEAR.Files.IncludingFile.BracketsNotRequired" />
9885
</rule>
99-
10086
<!-- https://github.com/wimg/PHPCompatibility/ -->
10187
<rule ref="PHPCompatibility">
10288
<exclude name="PHPCompatibility.PHP.EmptyNonVariable.Found" />
10389
<exclude name="PHPCompatibility.PHP.NewClosure.Found" />
10490
</rule>
10591
<!-- Check for cross-version support for PHP 5.6 and higher. -->
10692
<config name="testVersion" value="5.6"/>
107-
10893
<rule ref="WordPress">
10994
<exclude name="Generic.Files.LineEndings.InvalidEOLChar" />
11095
<exclude name="Generic.Commenting.DocComment.MissingShort" />
@@ -113,7 +98,7 @@
11398
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
11499
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys" />
115100
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.SpacesAroundArrayKeys" />
116-
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound"/>
101+
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound"/>
117102
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
118103
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
119104
<exclude name="WordPress.PHP.YodaConditions"/>
@@ -126,49 +111,42 @@
126111
<exclude name="WordPress.CSRF.NonceVerification.NoNonceVerification"/>
127112
<exclude name="WordPress.Classes.ClassInstantiation.MissingParenthesis" />
128113
</rule>
129-
130-
<rule ref="WordPress.PHP.StrictInArray"/>
131-
<rule ref="WordPress.DB.PreparedSQLPlaceholders"/>
114+
<rule ref="WordPress.PHP.StrictInArray"/>
115+
<rule ref="WordPress.DB.PreparedSQLPlaceholders"/>
132116
<rule ref="WordPress.CodeAnalysis.EmptyStatement"/>
133117
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
134-
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
135-
<rule ref="WordPress.DB.RestrictedFunctions"/>
118+
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
119+
<rule ref="WordPress.DB.RestrictedFunctions"/>
136120
<rule ref="WordPress.DB.RestrictedClasses"/>
137121
<rule ref="WordPress.PHP.DevelopmentFunctions"/>
138122
<rule ref="WordPress.PHP.DiscouragedPHPFunctions"/>
139123
<rule ref="WordPress.WP.AlternativeFunctions"/>
140124
<rule ref="WordPress.WP.DiscouragedConstants"/>
141-
<rule ref="WordPress.WP.DiscouragedFunctions"/>
142-
<rule ref="WordPress.WP.EnqueuedResources"/>
143-
<rule ref="WordPress.NamingConventions.PrefixAllGlobals"/>
144-
125+
<rule ref="WordPress.WP.DiscouragedFunctions"/>
126+
<rule ref="WordPress.WP.EnqueuedResources"/>
127+
<rule ref="WordPress.NamingConventions.PrefixAllGlobals"/>
145128
<rule ref="Wordpress-Docs">
146129
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
147130
</rule>
148-
149131
<rule ref="WordPress.WP.DeprecatedClasses">
150132
<properties>
151133
<property name="minimum_supported_version" value="4.9"/>
152134
</properties>
153135
</rule>
154-
155136
<rule ref="WordPress.WP.DeprecatedFunctions">
156137
<properties>
157138
<property name="minimum_supported_version" value="4.9"/>
158139
</properties>
159140
</rule>
160-
161141
<rule ref="WordPress.WP.DeprecatedParameters">
162142
<properties>
163143
<property name="minimum_supported_version" value="4.9"/>
164144
</properties>
165145
</rule>
166-
167146
<!-- Superglobal input not validated or sanitized. -->
168147
<rule ref="WordPress.Security.ValidatedSanitizedInput">
169148
<type>warning</type>
170-
</rule>
171-
149+
</rule>
172150
<rule ref="Generic.CodeAnalysis.EmptyStatement">
173151
<type>warning</type>
174152
</rule>
@@ -180,5 +158,4 @@
180158
<property name="text_domain" type="array" value="glossary-by-codeat,woo-fiscalita-italiana,genesis"/>
181159
</properties>
182160
</rule>
183-
184161
</ruleset>

0 commit comments

Comments
 (0)