-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Potential invalid offence with Lint/EndAlignment on case statements. #2317
Comments
I agree, the cop shouldn't complain about this. PR submitted. |
Nice, thanks! |
What about return case value
when 1 then 'one'
when 2 then 'two'
end Should that also be included in |
I guess this is trickier than I first thought. I don't really know what to do with even harder scenarios... return process case value
when 1 then 'one'
end,
case other
when 2 then 'two'
end A new style with such a subtle difference sounds a bit of an overkill to me, too. One possible solution is to ignore these cases altogether by |
I'm getting a Lint/EndAlignment offence with the following code:
I would expect that using
AlignWith: variable
with this cop it would treat method calls as just as valid as variable assignments. Supposing you don't agree with that there should be another switch for this cop to make it not handle case statements.I'm using v0.34.2. I think this offence will only have been present since PR #2157. Note that I also use
Style/CaseIndentation: IndentWhenRelativeTo: end
.Thanks.
The text was updated successfully, but these errors were encountered: