Closed AlecRust closed 4 years ago
With newer version of rubocop (0.92) and fix about the json output (see https://github.com/misogi/vscode-ruby-rubocop/issues/129), I don't have any issue (all my files have a frozen_string_literal: true
and auto correct is working).
Why must we run also unsafe corrections? I feel like auto correct unsafe corrections is, well, not safe, its more of an improvement.
Why is it a requirement?
Maybe we can try to add on option in the extension settings to toggle this behaviour?
@ngouy I agree it would be better to add an option for this. This PR fixes the behaviour to before the Rubocop change, but perhaps no longer necessary.
I don't have any issue (all my files have a frozen_string_literal: true and auto correct is working).
Strange, my understanding was this cop was unsafe in terms of autocorrect (https://github.com/rubocop-hq/rubocop/pull/8529).
Maybe I didn't quite understand the issue with the frize_string_litteral
thing. Is the issue that you expect it to be autocorrected when you don't have it in your file? Or is the issue that when you have it the autocorrect doesn't works for other policies?
Or asked otherwise : What is broken that this PR fix. Is that "just" that autoccorect only correct safe policies now or is there a real underlying bug? (thought it was to fix this : https://github.com/misogi/vscode-ruby-rubocop/issues/123#issuecomment-703136393)
As you said yourself in #101 maybe the real "fix" (if there is no bug) may be to add an option.
Is the issue that you expect it to be autocorrected when you don't have it in your file?
Yes. This was the behaviour I experienced before this regression (caused by new Rubocop release).
It's a kinda messy in last issues, some duplicates and sometimes many different bugs in a single one issue ^^' Hard to understand it all
Could you add an option (ex: safeAutoCorrect) that toggles --auto-correct
or --auto-correct-all
?
Please see https://github.com/misogi/vscode-ruby-rubocop/issues/123, https://github.com/misogi/vscode-ruby-rubocop/issues/101.