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

Autocorrection for Lint/NumberConversion #7023

Closed
dduugg opened this issue May 7, 2019 · 0 comments · Fixed by #7054
Closed

Autocorrection for Lint/NumberConversion #7023

dduugg opened this issue May 7, 2019 · 0 comments · Fixed by #7054

Comments

@dduugg
Copy link
Contributor

dduugg commented May 7, 2019

Is your feature request related to a problem? Please describe.

Lint/NumberConversion flags autocorrectable violations, e.g.

Replace unsafe number conversion with number class parsing, instead of using Time.now.to_f, use stricter Float(Time.now).

Describe the solution you'd like

I would like the option to have rubocop autocorrect with the suggested fix. (This of course would be accompanied by a SafeAutoCorrect: false default config.)

Describe alternatives you've considered

Manual autocorrection is the only alternative that comes to mind…

Additional context

N/A

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

Successfully merging a pull request may close this issue.

2 participants