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

Could we have a "Ruby: safe autocorrect by rubocop" command? #101

Open
tchiaspko opened this issue Jun 5, 2019 · 2 comments
Open

Could we have a "Ruby: safe autocorrect by rubocop" command? #101

tchiaspko opened this issue Jun 5, 2019 · 2 comments

Comments

@tchiaspko
Copy link

Currently when using the command pallett, the following is avaiable
Ruby: autocorrect by rubocop

Could we have a SAFE version of this (i.e. Ruby: autocorrect by rubocop) that run "rubocop --safe-auto-correct" instead of "rubocop --auto-correct" which may have unsafe changes?

@AlecRust
Copy link

The behaviour of rubocop --auto-correct has changed (#123) in Rubocop such that this extension now only runs safe cops.

I've raised #127 to bring this "autocorrect all" behaviour back. But probably the ideal solution is to run --auto-correct by default as it currently does, with an option to run unsafe cops with --auto-correct-all.

@Kayyow
Copy link

Kayyow commented Jul 4, 2021

I just submitted a PR to allow the usage of rubocop with the --auto-correct-all flag under an extension configuration option : #153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants