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
Closed

Missing patterns for Struct #28

marcandre opened this issue Jun 8, 2020 · 3 comments
Labels

Comments

@marcandre
Copy link
Contributor

@marcandre 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 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 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

@marcandre marcandre commented Jun 10, 2020

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
…chers

Closes rubocop-hq#28
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jun 10, 2020
…chers

Closes rubocop-hq#28
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jun 10, 2020
…chers

Closes rubocop-hq#28
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jun 19, 2020
…chers

Closes rubocop-hq#28
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jul 5, 2020
…chers

Closes rubocop-hq#28
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jul 6, 2020
…chers

Closes rubocop-hq#28
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jul 16, 2020
…chers

Closes rubocop-hq#28
tejasbubane added a commit to tejasbubane/rubocop-ast that referenced this issue Jul 18, 2020
…chers

Closes rubocop-hq#28
marcandre added a commit that referenced this issue Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.