-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Add Rails/FilePath auto-correct #434
Comments
Currently RuboCop Rails (2.9) doesn't support auto-correct for OTOH, I think it can be safely auto-corrected (rubocop -a), so it should be possible to enhance |
ah thx, I always thought it's correction because they usually had an auto-correct 👍 |
I updated the title/descriotion |
Autocorrection for this appears to have been added in #991 The exact example given here now autocorrects from: File.expand_path(__FILE__).sub("#{Rails.root}/", '') to File.expand_path(__FILE__).sub("#{Rails.root.join('')}", '') |
ah thx, I was like "looks sus but at least it will shut up" :D |
Expected behavior
autocorrect
Actual behavior
no autocorrect
Steps to reproduce the problem
see code above
RuboCop version
The text was updated successfully, but these errors were encountered: