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
Read TargetRubyVersion from gemspec required_ruby_version
if not specified
#8761
Labels
Comments
Fine by me. |
bbatsov
added
enhancement
good first issue
Easy task, suitable for newcomers to the project
labels
Sep 25, 2020
👋 I am going to take a stab at this one |
8 tasks
PR submitted 👍 |
HeroProtagonist
added a commit
to HeroProtagonist/rubocop
that referenced
this issue
Nov 8, 2020
HeroProtagonist
added a commit
to HeroProtagonist/rubocop
that referenced
this issue
Nov 8, 2020
HeroProtagonist
added a commit
to HeroProtagonist/rubocop
that referenced
this issue
Nov 8, 2020
bbatsov
pushed a commit
that referenced
this issue
Nov 8, 2020
cetinajero
added a commit
to cetinajero/rubocop
that referenced
this issue
Nov 12, 2020
This fixes an issue when the `required_ruby_version` uses `Gem::Requirement` to define the Ruby version. e.g. ``` s.required_ruby_version = Gem::Requirement.new('< 3.0.0') ``` Related to rubocop#8761
8 tasks
bbatsov
pushed a commit
that referenced
this issue
Nov 13, 2020
This fixes an issue when the `required_ruby_version` uses `Gem::Requirement` to define the Ruby version. e.g. ``` s.required_ruby_version = Gem::Requirement.new('< 3.0.0') ``` Related to #8761
ashkulz
added a commit
to prontolabs/pronto-rubocop
that referenced
this issue
Feb 18, 2021
As a result of rubocop/rubocop#8761 the TargetRubyVersion is read from the gemspec and due to a bug rubocop/rubocop#9482 this blocks the upgrade to support later RuboCop versions -- so let's specify 2.4 as a workaround.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Gemspec/RequiredRubyVersion enforces that gemspec.required_ruby_version is set and then complains that it differs from TargetRubyVersion in .rubocop.yml even if it is not specified in .rubocop.yml.
Having to specify TargetRubyVersion in .rubocop.yml in addition to gemspec.required_ruby_version duplicates the information.
Describe the solution you'd like
If TargetRubyVersion is not specified in .rubocop.yml it should be read from gemspec.required_ruby_version if present.
The text was updated successfully, but these errors were encountered: