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
Rails/ReflectionClassName false positive with Ruby 3.1 shorthand hashes #757
Comments
This is the Hash shorthand syntax introduced in Ruby 3.1. Please see the |
Hi @koic, Indeed it's the shorthand syntax, but shouldn't rubocop-rails work with it? The complaint is coming from rubocop-rails, not rubocop. We have |
Oops, You are right! This is a RuboCop Rails issue 🙇 |
Fixes rubocop#757. This PR fixes a false positive for `Rails/ReflectionClassName` when using Ruby 3.1's hash shorthand syntax.
Fixes rubocop#757. This PR fixes a false positive for `Rails/ReflectionClassName` when using Ruby 3.1's hash shorthand syntax.
…ection_class_name [Fix #757] Fix a false positive for `Rails/ReflectionClassName`
Expected behavior
RuboCop Rails should not raise an offence
Actual behavior
It does raise an offence :)
Steps to reproduce the problem
I've created a minimal example here: https://github.com/shkm/rubocop-rails-shorthand-hash-bug
RuboCop version
RuboCop Rails current master (0d0767d)
This issue may be related to #106
The text was updated successfully, but these errors were encountered: