You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having issues with this sniff. If I don't use exact property (which I've read I shouldn't in the customisation wiki), then I may miss on over indented code (and I wouldn't like this). If I use it, the errors for over indentation will happen (yay), but then I get errors reported in destructured arrays inside class methods
This will report issues on lines 9 and 10, telling me to indent them 4 instead of 6 spaces (I'm using 2 space indent without tabs).
When I write this outside class, I don't get any errors. Also just assigning an array to a variable doesn't cause any errors (in or out of class).
If I don't use exactthe error isn't shown, because I 'should' indent them 4 spaces, but they are indented 6 so it's not exact and it's ok (and it's not).
Is this a bug?
The text was updated successfully, but these errors were encountered:
Yes, I think there is something wrong here. This sniff disables exact indenting between arrays, but it's not working in this specific case. I think I know why though, so just looking into it.
gsherwood
changed the title
Generic.WhiteSpace.ScopeIndent destructuring indentation error in class context?
Generic.WhiteSpace.ScopeIndent error when using array destructuring with exact indent checking
Apr 15, 2019
I'm having issues with this sniff. If I don't use
exact
property (which I've read I shouldn't in the customisation wiki), then I may miss on over indented code (and I wouldn't like this). If I use it, the errors for over indentation will happen (yay), but then I get errors reported in destructured arrays inside class methodsThis will report issues on lines 9 and 10, telling me to indent them 4 instead of 6 spaces (I'm using 2 space indent without tabs).
When I write this outside class, I don't get any errors. Also just assigning an array to a variable doesn't cause any errors (in or out of class).
If I don't use
exact
the error isn't shown, because I 'should' indent them 4 spaces, but they are indented 6 so it's not exact and it's ok (and it's not).Is this a bug?
The text was updated successfully, but these errors were encountered: