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
...which obviously doesn’t have the same meaning. Running it with RSpec produces this:
before 1
example
after 1
before 2
example
after 2
So probably around blocks either shouldn’t be autocorrected, or there should be more sophisticated analysis. The proper correction for this case was something like
Minimal reproducible example:
Running this prints:
Running rubocop-rspec on it complains (reasonably):
Autocorrect does this:
...which obviously doesn’t have the same meaning. Running it with RSpec produces this:
So probably
around
blocks either shouldn’t be autocorrected, or there should be more sophisticated analysis. The proper correction for this case was something like(don’t mind the code layout; the essence is the order of operations).
A more realistic case (where it got me) was something along the lines:
...where the proper correction would be
...though I am not sure that this autocorrect is easy to deduce (and that the result looks better than the original code).
So, IDK, maybe
around
should be excluded fromScatteredSetup
check altogether.The text was updated successfully, but these errors were encountered: