-
Notifications
You must be signed in to change notification settings - Fork 370
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
feat: support io.Reader
based parsers
#451
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
I think the CLI actually doesn't mention "parse" at all right? To specify a parsing method we are using the I think we can go ahead and rename non breaking things to
Hmm I'm not clear on what you mean here. I had a look at |
This comment was marked as resolved.
This comment was marked as resolved.
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 pretty good! Just some minor comments.
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.
nice, thanks @G-Rath !!! looks pretty good overall.
|
||
lockfileContents, err := os.ReadFile(pathToLockfile) | ||
func (e PipenvLockExtractor) ShouldExtract(path string) bool { | ||
return filepath.Base(path) == "Pipfile.lock" |
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.
Is it worth creating constants for these names for all extractors, and using them in both ShouldExtract
and init
?
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.
Practically no because I don't see a strong value in doing that now since it's not like it'll make the code faster or anything, and architecturally I'd argue you're conflating "extractor names" with "file paths"
Resolves #176