-
Notifications
You must be signed in to change notification settings - Fork 531
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
fix: requirements.txt - return unicode only letter/num for version #1361
Conversation
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
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.
LGTM -- just a thought: it looks like the backslash is a typical line continuation. I wonder if this would work if we replaced \\\n
with empty string first and then processed versions, or if the --hash=...
stuff would muck that all up?
Benchmark Test ResultsBenchmark results from the latest changes vs base branch
|
Are you asking if instead we zipped those above 3 into a single line and parsed that?
|
@spiffcs yeah, exactly -- I'm mostly wondering if all
And then extracted the version, this may make processing more consistent for other cases. I'm fine with the change as is, though, especially if this suggestion would make it a significantly larger change (e.g. we're always looking for version at the end of a line and now we need to do other stuff). |
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
@kzantow I added a case to cover the negative here: I'm going to read more about |
Summary
Closes #1360 - Trim space fails to cut the end of a string given a blocking
\
This fix updates the code to use strings.TrimFunc to only return strings with valid Unicode letter/number.
cc @robcresswell
Signed-off-by: Christopher Phillips christopher.phillips@anchore.com