-
Notifications
You must be signed in to change notification settings - Fork 56
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
Ensure that spacing around cases
are consistent
#169
Conversation
Isn't there better alternative than having same input and fixed file? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving the addition of the configuration as such (thanks, @carusogabriel!) but the #169 (comment) concern needs to be taken into account.
The original issue was that the properly formatted code was reported as containing errors. I don't know if the sniff is supposed to fix it or just not report.
The sniff is just not reporting it, that's why both If you remove the added options in the Ruleset file, it'll break. |
ca32067
to
05ba49c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, this should be better I think. Those options actually affect result of the diff so I think it's useful to show what they change
As reported via slevomat/coding-standard#867, in case that a switch with cases returning or breaking, the `JumpStatementsSpacing` sniff wasn't handling it properly. These 3 new options added ensure that this sniff handles this case as well.
05ba49c
to
1f1aa19
Compare
Thanks @carusogabriel and @morozov for the suggestion! |
As reported via slevomat/coding-standard#867, in case that a switch
with cases returning or breaking, the
JumpStatementsSpacing
sniffwasn't handling it properly.
These 3 new options ensure that this sniff handles this case as well.
Requested by @morozov via #167 (comment).