Closed widoz closed 6 years ago
🤔 I believe you, but I am having trouble replicating the issue. I downloaded the file you linked, and ran NeutronStandard on it, and this is what I get:
$ phpcs -s --standard=NeutronStandard HeaderBackground.php
FILE: /Users/payton/Test/HeaderBackground.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 32 ERRORS AFFECTING 14 LINES
-------------------------------------------------------------------------------------------------------------------------------
2 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
2 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
49 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
49 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
53 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
56 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
56 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
56 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
56 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
60 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
60 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
61 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
61 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
61 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
61 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
64 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
65 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
65 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
65 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
65 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
66 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
67 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
75 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
75 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
75 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
75 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
76 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
76 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
90 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
90 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
98 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
98 | ERROR | [x] Parenthesis content must be padded by a space (NeutronStandard.Whitespace.RequireParenthesisSpacing.Missing)
I wonder if there's some way it could be interacting with the other standards...
Can you try the same command (or something similar, but the -s
is important so you can see the sniff names) on your machine and send me the results?
Ah, this might be because of #62
@widoz I think the v1.5.2 release should fix your issue. It was an upstream change in phpcs that broke these sniffs which is why I didn't notice it until now.
Let me know if it still doesn't work!
I get a
Return type is missing
for https://github.com/widoz/unprefix/blob/refactor-php7/src/Template/Model/HeaderBackground.php#L47 and many other methods/functions even thought I explictly set the return type hint.Installed Packages:
The issue seems become from neutron standard because removing it by https://github.com/widoz/unprefix/blob/refactor-php7/ruleset.xml#L61 and also trying to explicitly set the standard when run
phpcs
command.