Skip to content

Commit 627a5d3

Browse files
committed
Core: remove an exclusion
Turns out the exclusion is a little too aggresive. The `Generic.WhiteSpace.LanguageConstructSpacing` _will_ throw an error when there is too much whitespace, but not when there is no whitespace and the next thing is an open parenthesis. By removing the exclusion, an error will now (correctly) be thrown when there is no whitespace between a closure `use` keyword and the open parenthesis. It also means that where there is _too much_ whitespace between the keyword and the open parenthesis, two errors will be thrown, one from the `Generic.WhiteSpace.LanguageConstructSpacing` sniff and one from the `Squiz.Functions.MultiLineFunctionDeclaration` sniff. Well, so be it. As both sniffs expect the same thing, this shouldn't lead to fixer conflicts anyhow. See #764 (comment)
1 parent 15c3037 commit 627a5d3

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

WordPress-Core/ruleset.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,6 @@
218218
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration.BraceIndent">
219219
<severity>0</severity>
220220
</rule>
221-
<!-- Prevent duplicate message. This is already checked by the Generic.WhiteSpace.LanguageConstructSpacing sniff. -->
222-
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterUse">
223-
<severity>0</severity>
224-
</rule>
225221

226222
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
227223
<properties>

0 commit comments

Comments
 (0)