rubocop-rspec icon indicating copy to clipboard operation
rubocop-rspec copied to clipboard

RSpec/ScatteredLet autocorrect improvements

Open Darhazer opened this issue 5 years ago • 0 comments

I have played recently with ScatteredLet autocorrects and noticed a couple of things.

First, it moves everything after the first let, which changes the order of lets. It would be better to move it after the last consecutive (non-offending let)

Also, it does not move comments - something that most likely applies to all cops that use the MoveNode helper. Note that this applies to inline comments, but also to comments directly before the node to be moved.

Darhazer avatar May 26 '20 14:05 Darhazer