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
DataInheritance cop similar to StructInheritance #11696
Labels
Comments
Hey 👋 If this issue is free for grabs I'd love to work on it! Been using rubocop for years and would love to contribute back to the community 😅 |
Go for it! |
8 tasks
ktopolski
pushed a commit
to ktopolski/ruby-style-guide
that referenced
this issue
Mar 26, 2023
See also: * [PR adding new cop for this rule](rubocop/rubocop#11728) * [Original issue](rubocop/rubocop#11696)
ktopolski
pushed a commit
to ktopolski/ruby-style-guide
that referenced
this issue
Mar 26, 2023
See also: * [PR adding new cop for this rule](rubocop/rubocop#11728) * [Original issue](rubocop/rubocop#11696)
ktopolski
pushed a commit
to ktopolski/rubocop
that referenced
this issue
Apr 2, 2023
koic
added a commit
that referenced
this issue
Apr 3, 2023
[Fix #11696] Add new `Style/DataInheritance` cop
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
https://github.com/rubocop/rubocop/blob/master/lib/rubocop/cop/style/struct_inheritance.rb exists because using the bad form creates a useless anonymous class (as documented):
Ruby 3.2's Data class has the same issue, so it makes sense to have that cop (or a new cop) detect the same pattern:
Describe the solution you'd like
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: