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

Relax TargetRubyVersion #107

Merged
merged 1 commit into from
Apr 21, 2021
Merged

Conversation

koic
Copy link
Collaborator

@koic koic commented Apr 20, 2021

The next version of RuboCop will drop Ruby 2.4 support.
rubocop/rubocop#9648

This PR prevents the following error with edge RuboCop (and next stable RuboCop).

% bundle exec rubocop --parallel
Error: RuboCop found unsupported Ruby version 2.4 in `TargetRubyVersion`
parameter (in /Users/koic/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/
rubocop-rails_config-1.4.0/config/rails.yml).
2.4-compatible analysis was dropped after version 1.12.
Supported versions: 2.5, 2.6, 2.7, 3.0

The minimum Ruby supported version of the next RuboCop is 2.5.

I think it would be beneficial for both UX and maintainability to omit TargetRubyVersion and delegate it to RuboCop core.

The next version of RuboCop will drop Ruby 2.4 support.
rubocop/rubocop#9648

This PR prevents the following error with edge RuboCop (and next stable RuboCop).

```console
% bundle exec rubocop --parallel
Error: RuboCop found unsupported Ruby version 2.4 in `TargetRubyVersion`
parameter (in /Users/koic/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/
rubocop-rails_config-1.4.0/config/rails.yml).
2.4-compatible analysis was dropped after version 1.12.
Supported versions: 2.5, 2.6, 2.7, 3.0
```

The minimum Ruby supported version of the next RuboCop is 2.5.

I think it would be beneficial for both UX and maintainability to omit
`TargetRubyVersion` and delegate it to RuboCop core.
@koic
Copy link
Collaborator Author

koic commented Apr 20, 2021

next stable RuboCop

FYI: RuboCop 1.13.0 has been released.
https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md#1130-2021-04-20

@toshimaru
Copy link
Owner

I think it would be beneficial for both UX and maintainability to omit TargetRubyVersion and delegate it to RuboCop core.

it sounds reasonable, let's delegate TargetRubyVersion to rubocop-core.

@toshimaru toshimaru merged commit 3d259a5 into toshimaru:main Apr 21, 2021
@koic koic deleted the relax_target_ruby_version branch April 21, 2021 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants