-
Notifications
You must be signed in to change notification settings - Fork 281
Create something like RuboCop's node matcher macros #1288
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
Comments
They are tremendously useful. 🙂 There are some pending features for the node matchers, for example optional fragments, that currently no-one is working on. If @bbatsov is up for it, perhaps it can be extracted into a separate gem, and contributions can be made from more directions. WDYT? |
Yes, I would like to extract it into a separate gem. And I tried to extract it, but it has been stopped because I was very busy. https://github.com/pocke/node_pattern |
I'm not opposed to the idea. A lot of things can be extracted from RuboCop, but I simply never got to doing so. Much of the AST node extensions are also something that'd be useful to anyone using underlying @pocke Cool! |
Having this extracted to a separate gem would be great for us. @pocke do you think your attempt can be continued or is it too outdated? |
I see it's just 21 days old. I would hardly call this outdated. 😄 |
Oh wow, I wouldn't have guessed. My timeframe for concluding 'stopped because too busy' is a bit longer than @pocke's, it seems 😆. |
As an experiment, I implemented part of NilCheck using the RuboCop system. I found the node patterns and matcher macros very nice and useful.
More information here: https://github.com/bbatsov/rubocop/blob/f5fed30d4106c8aff7dd27ffef947def530deae1/manual/node_pattern.md
The text was updated successfully, but these errors were encountered: