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

Use node groups in node patterns to replace unions of types #141

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

dvandersluis
Copy link
Member

rubocop-ast defines some node groups (https://github.com/rubocop/rubocop-ast/blob/85bfe84/lib/rubocop/ast/node.rb#L89-L116) that can be used in place of a union of node types.

@dvandersluis dvandersluis requested a review from a team as a code owner January 27, 2025 20:53
@dvandersluis
Copy link
Member Author

CI failures are unrelated, and should be fixed by #142.

`rubocop-ast` defines some node groups (https://github.com/rubocop/rubocop-ast/blob/master/lib/rubocop/ast/node.rb#L89-L116) that can be used inside node pattern matchers in place of a union of node types.
@ydah ydah merged commit f7fe809 into rubocop:main Feb 6, 2025
27 checks passed
@dvandersluis dvandersluis deleted the use-node-groups branch February 6, 2025 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants