-
Notifications
You must be signed in to change notification settings - Fork 39
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
Disable rule inline over multiple lines #234
Comments
Alternatively / in addition, it might be useful if a non-ranged disable would affect an entire expression, even if it spans over multiple lines. |
Instead of changing the semantics of # ameba:disable_block Layout/TrailingWhitespace
output = <<-OUTPUT
Hello there!.
OUTPUT
# ameba:enable_block Layout/TrailingWhitespace This would avoid a breaking change for |
I also doubt whether there's an actual need to have two different pragmas for applying to the same line ( |
Btw. that's exactly what rubocop does. I would just do it exactly that way. |
There are long-running uncontinuous discussions on GitHub on how to improve what currently rubocop does in terms of cop disabling. I don't think it is a silver bullet. However, I would appreciate any help on this. Thanks |
Related to #233.
Because
# ameba:disable
only disablse the rule on the next line, I'm not able to apply it to the whole heredoc to get linting to pass. I also can't add it at the end of the line as that makes the spec fail due to expecting the actual string to contain# ameba:disable Layout/TrailingWhitespace
.It would be a nice feature to be able to disable a rule over a multi line range. E.g.
The text was updated successfully, but these errors were encountered: