-
Notifications
You must be signed in to change notification settings - Fork 117
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
Support providing a custom ERB parser class #67
Conversation
parse_buffer(buffer, file_path: file_path) | ||
end | ||
|
||
def parse_buffer(buffer, file_path:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I split this to allow subclasses to implement #parse_buffer
without concerning themselves with the actual file read.
CLA signed 👍 |
👋 Hi folks, is there anything we (@joshaber and I) can do to help move this along? Thanks! 🙇 |
Sorry folks, we've been a little busy with some internal stuff and the holiday season coming up. We'll get someone to look into this. |
As previously the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@tomstuart would you be able to give this a second review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks clean, simple & correct to me. Thank you @joshaber!
Thanks all! ✨ |
What are you trying to accomplish?
Fixes #66
This allows users to specify a custom ERB parser to support non-standard tags. For example, we can use it to comment out
<%graphql>
tags from https://github.com/github/graphql-client so that Packwerk can parse the rest of the file:What approach did you choose and why?
This is similar to how graphql-client handles this same problem for Erubi itself: https://github.com/github/graphql-client/blob/master/lib/graphql/client/erubi_enhancer.rb
What should reviewers focus on?
Is this the appropriate way to set a global configuration value? Should it be set in
Configuration
instead?Type of Change
Additional Release Notes
Users can now specify a custom ERB parser:
Checklist