Update rubocop-rails to lint deprecated enum keywords#11364
Conversation
.rubocop.yml
Outdated
There was a problem hiding this comment.
I think we could enable this. It's a bit more of a stylistic one, and the "Safety" notes gave me pause to trust the autocorrecter without closer inspection.
https://docs.rubocop.org/rubocop-rails/cops_rails.html#railswhererange
There was a problem hiding this comment.
Yeah, it seems more stylistic and I don't find it significantly better? I could go either way on it.
There was a problem hiding this comment.
Personally I have trouble recalling whether .. or ... is the inclusive version in a range (i.e. <= or >=), so I'd worry this could also negatively impact readability. Maybe that's just me though 😄
There was a problem hiding this comment.
I have a slight preference for the explicit >, < as well, so it's not just you 🙂
changelog: Internal, Linting, Update rspec-rails to lint deprecated enum keywords
4ea1947 to
f6aa2a5
Compare
🛠 Summary of changes
Updates
rubocop-railsto the latest version and addresses identified issues.In particular, this supports #11357, where Rails 7.2 will now noisily output deprecation messages for
enumusage with keyword arguments, slated to be removed in Rails 8 (see rails/rails#50987). Newer versions ofrubocop-railsincludes aRails/EnumSyntaxcop to help identify these.📜 Testing Plan
Verify build passes.
Review relevant cops for changes to identify any incompatibilities with "Safety" notes from documentation:
https://docs.rubocop.org/rubocop-rails/cops_rails.html