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
Cop idea: Read ruby version from .ruby-version
source in Gemfile
#11744
Comments
This would be better suited for |
Right, can someone transfer it to the main repository ? |
I'm not sure if this makes sense, for the following reasons:
I think it's not a suitable enforcement rule for the above cases. In other words, I'm wondering if it should not be supported in the RuboCop core as a general purpose rule, as this feature request seems to be specific to an application development environment. |
Thank you for the explanation @koic ! Indeed, there are too many edge cases to make it an enforcement rule 👍 |
Is your feature request related to a problem? Please describe.
Currently, the Ruby version for a project is duplicated twice which is not very practical when a Ruby update is necessary as it has to be modified in both places:
once in the
Gemfile
once in
.ruby-version
Describe the solution you'd like
It could be great to have a cop that detects it and replace the
Gemfile
line reading it from.ruby-version
(the cop should automatically autocorrect it as well)Describe alternatives you've considered
/
Additional context
What do you think about this cop ? Do you see any reason to not make a cop that detect this behavior ?
(sorry if there was already discussions about this, I didn't find any of them in the repo, feel free to close if this subject is not relevant)
Thank you :)
The text was updated successfully, but these errors were encountered: