RuboCop: Tweaking cop rules per Ruby version
What does this MR do and why?
- Disable Lint/RedundantRequireStatement for Ruby 3.2
- Skip short-hand syntax for Style/HashSyntax for Ruby 3.2
Follow-up of !132439 (merged).
How to set up and validate locally
unset REVEAL_RUBOCOP_TODO
asdf local ruby 3.0.5
bundle exec rubocop app/model/compare.rb # Based on https://gitlab.com/gitlab-org/gitlab/-/jobs/4638615454
Inspecting 1 file
.
1 file inspected, no offenses detected
asdf local ruby 3.1.4
bundle exec rubocop app/models/compare.rb
Inspecting 1 file
.
1 file inspected, no offenses detected
asdf local ruby 3.2.2
bundle exec rubocop app/models/compare.rb
Inspecting 1 file
.
1 file inspected, no offenses detected
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Peter Leitzen