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

Prove that semantic matching of given expressions already works #8175

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

sschuberth
Copy link
Member

@sschuberth sschuberth commented Jan 25, 2024

Please have a look at the individual commit messages for the details.

Note

Breaking change: Programmatic use needs to update import org.ossreviewtoolkit.utils.spdx.model.SpdxLicenseChoice to import org.ossreviewtoolkit.utils.spdx.SpdxLicenseChoice.

@sschuberth sschuberth requested a review from a team as a code owner January 25, 2024 11:48
The `model` package is reserved for classes that are part of the SPDX
document model, but `SpdxLicenseChoice` is an ORT model class.

Signed-off-by: Sebastian Schuberth <[email protected]>
This tests the same scenario as the "return the new expression if only a
part of the expression is matched by the subExpression" test.

Signed-off-by: Sebastian Schuberth <[email protected]>
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8472931) 67.16% compared to head (2dd79a4) 67.16%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8175   +/-   ##
=========================================
  Coverage     67.16%   67.16%           
+ Complexity     2052     2049    -3     
=========================================
  Files           358      357    -1     
  Lines         17166    17158    -8     
  Branches       2462     2461    -1     
=========================================
- Hits          11530    11525    -5     
+ Misses         4613     4611    -2     
+ Partials       1023     1022    -1     
Flag Coverage Δ
funTest-docker 66.25% <ø> (ø)
funTest-non-docker 33.96% <ø> (ø)
test 36.98% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This avoids potentially expensive `validChoices()` calls on literal
expression matches.

Signed-off-by: Sebastian Schuberth <[email protected]>
@sschuberth sschuberth force-pushed the spdx-license-choice-imps branch from 801f1a8 to 2dd79a4 Compare January 25, 2024 12:25
@sschuberth sschuberth merged commit 47da430 into main Jan 25, 2024
22 checks passed
@sschuberth sschuberth deleted the spdx-license-choice-imps branch January 25, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants