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 #9175] Fix status for offenses that are not correctable. #9190

Merged
merged 1 commit into from
Dec 8, 2020

Commits on Dec 8, 2020

  1. [Fix rubocop#9175] Fix status for offenses that are not correctable.

    This addresses a few things:
    1) Calling `add_offense` or `add_offense { |corrector| # don't auto-correct }` should be handled the same way. An empty corrector is now replaced by `nil`.
    2) Tweaks how the status is handled. Status `:uncorrected` is reserved for cases where there is a corrector but it is not applied.
    3) Old style cops' `auto_correct` method is now called even when run without auto-correction. This way we can know if they can auto-correct or not. It also simplifies logic.
    
    I should have done 3) during my refactor (I don't see how it could be incompatible)
    marcandre committed Dec 8, 2020
    Configuration menu
    Copy the full SHA
    e3f9e49 View commit details
    Browse the repository at this point in the history