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

RequiredRubyVersion #7876

Closed
marcandre opened this issue Apr 14, 2020 · 3 comments
Closed

RequiredRubyVersion #7876

marcandre opened this issue Apr 14, 2020 · 3 comments

Comments

@marcandre
Copy link
Contributor

@marcandre marcandre commented Apr 14, 2020

The Gemspec/RequiredRubyVersion cop checks that spec.required_ruby_version= (if present) corresponds to TargetRubyVersion.

That's good.

I'd like a more basic check: that required_ruby_version is there at all. I believe that it should be an accepted community standard to have it; there is no valid reason not to have a required_ruby_version specified that I can think of.

I opened an rfc about that, but it would probably take time before this is accepted / implemented / released and mostly updated... A Rubocop might make things faster.

In case there is a .travis.yml file, it would be nice to check it correponds too.

  1. How does a cop making required_ruby_version mandatory sound?

  2. If that's a go, should it be a different cop?

  3. What about .travis.yml check?

@bbatsov
Copy link
Collaborator

@bbatsov bbatsov commented Apr 17, 2020

I like the idea. I can't come up with a good reason why a gem shouldn't specify some required Ruby version.

@marcandre
Copy link
Contributor Author

@marcandre marcandre commented Apr 17, 2020

  1. should it be a different cop?

  2. What about .travis.yml check?

@fatkodima
Copy link
Contributor

@fatkodima fatkodima commented Sep 27, 2020

Should this gets closed?

@marcandre marcandre closed this Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.