-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
Expected behavior
Not to flag the Style/RedundantLineContinuation
offense.
Actual behavior
Offense is flagged and incorrectly autocorrected.
Steps to reproduce the problem
Input:
expect(cart).to include \
plan: 'plan',
coupon: nil,
item: nil
This is flagged as:
Style/RedundantLineContinuation: Redundant line continuation.
expect(cart).to include \ ...
Output after autocorrecting:
expect(cart).to include
plan: 'plan',
coupon: nil,
item: nil
Which is no longer valid Ruby code.
RuboCop version
$ [bundle exec] rubocop -V
1.61.0 (using Parser 3.3.0.5, rubocop-ast 1.30.0, running on ruby 3.1.4) [arm64-darwin22]
- rubocop-factory_bot 2.25.1
- rubocop-performance 1.20.2
- rubocop-rails 2.23.1
- rubocop-rspec 2.26.1
jgraichen, bquorning and scbjans