Skip to content
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

[Fix #10375] Defer auto-correction of nested unless/else #10461

Merged
merged 1 commit into from Mar 20, 2022

Commits on Mar 19, 2022

  1. [Fix rubocop#10375] Defer auto-correction of nested unless/else

    An unless/else nested inside another unless/else would cause rewrite clobbering
    when auto-correcting both offenses. By ignoring the node after correcting it
    and skipping auto-correction for inner nodes with the same offense, we avoid
    this problem.
    
    The auto-correct loop will pick up the remaining offense and fix it. No test
    case is added for this particular aspect, but it's standard RuboCop behavior.
    jonas054 committed Mar 19, 2022
    Copy the full SHA
    6915fd3 View commit details
    Browse the repository at this point in the history