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

Refactor constraint expression parser to allow for quoted versions #234

Merged
merged 2 commits into from
Feb 16, 2021

Conversation

wagoodman
Copy link
Contributor

The existing constraint expression parsing assumed that splitting an expression by || is good enough to split OR'd expressions, however versions may have these delimiters within quoted text --the same goes for parenthetical statements. This PR rectifies fortifies the existing parser and allows for quoted versions to have arbitrary characters.

@wagoodman wagoodman added the enhancement New feature or request label Feb 11, 2021
@wagoodman wagoodman self-assigned this Feb 11, 2021
grype/version/constraint_unit.go Outdated Show resolved Hide resolved
grype/version/constraint_unit.go Show resolved Hide resolved
grype/version/constraint_expression.go Show resolved Hide resolved
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
@wagoodman wagoodman force-pushed the refactor-version-constraint-parsing branch from 8e88836 to 0a94080 Compare February 16, 2021 14:15
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
@wagoodman wagoodman merged commit b5bc8e0 into main Feb 16, 2021
@wagoodman wagoodman deleted the refactor-version-constraint-parsing branch February 16, 2021 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants