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
[Fixes #8156] CLI options change: auto-correct now safe by default. #8192
Conversation
I think this is a practical change, and
https://github.com/rubocop-hq/rubocop/blob/master/CONTRIBUTING.md#changelog-entry-format |
Might be a good idea to keep the old option around with some deprecation message, or at least show a message when people try to invoke it. |
6ab4941
to
86b0328
Compare
I've added back "--safe-autocorrect" with a warning "--safe-autocorrect is deprecated; use --autocorrect". |
You should also update https://docs.rubocop.org/rubocop/0.86/usage/auto_correct.html |
…ault. `-a` / `--auto-correct` are now safe only, replacing `--safe-auto-correct` `-A` / `--auto-correct-all` apply safe and unsafe corrections
Oops, right. Done. |
Thanks! |
@@ -69,7 +69,7 @@ def setup_subtasks(name, *args, &task_block) | |||
task(:auto_correct, *args) do |_, task_args| | |||
RakeFileUtils.verbose(verbose) do | |||
yield(*[self, task_args].slice(0, task_block.arity)) if block_given? | |||
options = full_options.unshift('--auto-correct') | |||
options = full_options.unshift('--auto-correct-all') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbatsov Hi! Given the name of this task and the change to the behaviour of the command line option to be 'safe' changes only, should the rake task have been changed to doing safe changes only too (by not changing this line)?
Thanks.
I'm proposing slightly different options than in #8156:
-a
/--auto-correct
are now safe only, replacing--safe-auto-correct
-A
/--auto-correct-all
apply safe and unsafe correctionsHelp reads: