Skip to content

Style/HashSyntax: Use EnforcedShorthandSyntax: never for Ruby 3.1

Peter Leitzen requested to merge pl-rubocop-hash-syntax-shorthand-31 into master

What does this MR do and why?

Short-hand Hash syntax does not work prior 3.1.

Closes #396229 (closed).

How to set up and validate locally

  1. Switch to Ruby 3.1 via asdf local ruby 3.1.3
  2. Checkout !114366 (closed) and bundle
  3. Remove Style/HashSyntax from .rubocop.yml
  4. Cherry-pick f6220090 via git cherry-pick f6220090cbc5c3aa96882051b2ad243c40097dc2
  5. Verify RuboCop configuration via bundle exec rubocop --show-cops Style/HashSyntax
  6. Run RuboCop without offenses via bundle exec rubocop ee/spec/requests/api/resource_weight_events_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports