Skip to content
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

Missing patterns for Struct #28

Closed
marcandre opened this issue Jun 8, 2020 · 3 comments · Fixed by #30
Closed

Missing patterns for Struct #28

marcandre opened this issue Jun 8, 2020 · 3 comments · Fixed by #30
Labels
help wanted Extra attention is needed

Comments

@marcandre
Copy link
Contributor

marcandre commented Jun 8, 2020

We need a struct_constructor? matcher (see #8122)
A more general "class_definition?matcher that would matchclass Foo < Bar, Struct.new(...) doandClass.new(...) do` would be nice too

@marcandre
Copy link
Contributor Author

marcandre commented Jun 8, 2020

Maybe the same should be applied to Modules, and a very generic module_definition? that would encompass both classes (which are modules) and modules?

@bbatsov
Copy link
Contributor

bbatsov commented Jun 10, 2020

I like this idea, although we'll probably need something more specific for modules as well, as I don't recall many instances in RuboCop where we treated classes as modules.

@marcandre
Copy link
Contributor Author

Right, I don't know the cops well enough, there might not be a need for a way to select "code blocks".

tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jun 10, 2020
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jun 10, 2020
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jun 10, 2020
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jun 19, 2020
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jul 5, 2020
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jul 6, 2020
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jul 16, 2020
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants