-
Notifications
You must be signed in to change notification settings - Fork 550
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
Upgrade RuboCop to v1.30 #1268
Upgrade RuboCop to v1.30 #1268
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for doing this! The only specific change I'd like is removing the extra psych
gem that was pinned lower for older versions of RuboCop.
The other comment about older versions of Rake can be dealt with in a Ruby 2.x or higher pass. There may be some other old syntax or old C extension methods that can be cleaned up as well.
else | ||
'< 13' | ||
end | ||
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the next release could drop Ruby < 2.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to omit if-else condition, but rake 13.x supports only Ruby 2.2+.
So can we drop Ruby 2.1 from the CI matrix?
mysql2/.github/workflows/build.yml
Lines 18 to 27 in 80e0001
ruby: | |
- '3.1' | |
- '3.0' | |
- '2.7' | |
- '2.6' | |
- '2.5' | |
- '2.4' | |
- '2.3' | |
- '2.2' | |
- '2.1' |
and also CentOS 7 with Ruby 2.0.0?
mysql2/.github/workflows/container.yml
Lines 14 to 15 in 80e0001
# CentOS 7 system Ruby is the fixed version 2.0.0. | |
- {distro: centos, image: 'centos:7', name_extra: 'ruby 2.0.0'} |
RuboCop v1.30.1 fixed a false positive for Style/SafeNavigation
RuboCop v1.30.0 can now parse Ruby 2.0 code.
This PR upgrades RuboCop to v1.30 and also fixes and suppresses some cops.
It was hard to fix all cops, so I fixed only the simple ones.
This PR supersedes #1256.