-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic.WhiteSpace.ScopeIndent false positive with nested match
-es
#110
Comments
The issues is still present in v3.9.0. |
@andrey-yantsen You are welcome to submit a patch... |
@jrfnl I'm in no way rushing it, and I want to do a patch at some later date. Sorry if it sounded like an attack, that wasn't my intention :) I just saw that there were some changes around the processing of |
Pff.. this was complex one. PR #502 should fix it though. Testing appreciated. |
Thank you, @jrfnl! I just checked the master branch — the issue is gone for all the examples I had at hand. |
Thanks @andrey-yantsen for testing and confirming! |
Describe the bug
The ScopeIndent sniff suggests a quite strange indentation when processing multi-nested
match
-statements// It's a copy of my bug report from the old repo (squizlabs/PHP_CodeSniffer#3875)
// Thank you, Juliette, for an amazing initiative in keeping the project going!
Code sample
How that code will look if formatted as suggested
Custom ruleset
N/A — reproducible with PSR12
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample abovephpcs -s --standard=psr12 test.php
Expected behavior
No indentation errors.
Versions (please complete the following information)
Additional context
none
Please confirm:
master
branch of PHP_CodeSniffer.The text was updated successfully, but these errors were encountered: