You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add a way to specify minimum supported version for a project via .rubocop.yml
add a generic config for cops like RequiredRubyVersion, which will act in tandem with the global setting
The net result is that we'll stop hardcoding Ruby versions inside cops and it will be much clearer from the config if some cop isn't supporting all Rubies RuboCop supports.
The text was updated successfully, but these errors were encountered:
This parameter can be used to configure which version of the Ruby interpreter
the inspected code is intended to run under. When checking syntax by running
the parser on a snippet of corrected code, RC will use the corresponding parser.
Also, RC will not encourage the use of a construct which is not available under
the target version. Auto-correction will also be careful not to emit code which
will not run on the target interpreter.
Previously, since the parser used was tied to the version of the underlying
Ruby interpreter, not all specs were run on all Ruby versions. Also, it was not
possible to run RC on a 1.9 interpreter to check a project using 2.2 syntax
(for example). Now, all specs run on all Ruby versions, and you can use any
supported interpreter to check any project.
Closesrubocop#2389, closesrubocop#2550.
This PR reminded me that we finally have to:
.rubocop.yml
RequiredRubyVersion
, which will act in tandem with the global settingThe net result is that we'll stop hardcoding Ruby versions inside cops and it will be much clearer from the config if some cop isn't supporting all Rubies RuboCop supports.
The text was updated successfully, but these errors were encountered: