-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(spdx-utils): Correctly determine choices for
AND
expressions
The original code was clearly wrong in that it recursively decomposed an expression and composed the contained expressions always with `AND` although there could be nested `OR` expressions. Instead, if there is a top-level `AND` in an expressions, create all combinations of choices on the left and choices on the right to get the total valid choices. Reword affected tests according to the fact that returned choices are not simplified, but explicit, though still deduplicated. Commonly introduce a `choice` variable along the way to make tests for long license expressions more readable. Fixes #8082. Signed-off-by: Sebastian Schuberth <[email protected]>
- Loading branch information
1 parent
ec58923
commit 6ad4d0a
Showing
2 changed files
with
33 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters