We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When the trailing backslash is inside a string literal, I think it needs to be disregarded by the Style/RedundantLineContinuation cop.
I expect these two spec examples to pass in spec/rubocop/cop/style/redundant_line_continuation_spec.rb:
expect_no_offenses(<<~'RUBY') "foo \ bar" RUBY expect_no_offenses(<<~'RUBY') 'foo \ bar' RUBY
The spec examples fail, suggesting to remove the trailing backslash.
See above.
7c35167
The text was updated successfully, but these errors were encountered:
cc @koic, @ydah
Sorry, something went wrong.
Style/RedundantLineContinuation
@bquorning Yeah, I've opened #11759 to fix the issue.
[Fix rubocop#11758] Fix a false positive for `Style/RedundantLineCont…
e97d924
…inuation` Fixes rubocop#11758. This PR fixes a false positive for `Style/RedundantLineContinuation` when line continuations for string.
[Fix #11758] Fix a false positive for Style/RedundantLineContinuation
0ee7f67
Fixes #11758. This PR fixes a false positive for `Style/RedundantLineContinuation` when line continuations for string.
Successfully merging a pull request may close this issue.
When the trailing backslash is inside a string literal, I think it needs to be disregarded by the Style/RedundantLineContinuation cop.
Expected behavior
I expect these two spec examples to pass in spec/rubocop/cop/style/redundant_line_continuation_spec.rb:
Actual behavior
The spec examples fail, suggesting to remove the trailing backslash.
Steps to reproduce the problem
See above.
RuboCop version
7c35167
The text was updated successfully, but these errors were encountered: