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
For some reason after upgrading to version 0.46.0, we're unable to disable the Layout/CaseIndentation lint. We get a lot of reports, but when I add it to the our custom RuboCop overrides, it won't disable it. That appears to be the only rule that won't disable, though. Others work as intended.
The text was updated successfully, but these errors were encountered:
Because of how the new Rubocop system works, some cops are forced in some specific configuration.
This is needed because the way the system works, haml-lint basically converts the HAML to valid ruby, runs rubocop, and then transfers the fixes. Some cops do transformation that ruin the expected structure of the code. CaseIndentation is one such example.
I'm curious, are the errors you mention in regular haml (with - and =) or in a :ruby filter?
I understand your concern. The effect is less pronounced when you have content in your when, such as:
- case something
- when 'foo'
abc
- when 'bar'
def
- unless something_els
The main reason we need to use the non-indented configuration is that HAML fails on this:
- case 1
- when 1
- when 2
foo
For some reason, it inserts an extra end in the generated Ruby code, which is a SyntaxError. So in "indented when" mode, auto-correction could lead to this "valid" HAML that HAML fails to process, which I want to avoid as much as possible.
For some reason after upgrading to version 0.46.0, we're unable to disable the
Layout/CaseIndentation
lint. We get a lot of reports, but when I add it to the our custom RuboCop overrides, it won't disable it. That appears to be the only rule that won't disable, though. Others work as intended.The text was updated successfully, but these errors were encountered: