-
Notifications
You must be signed in to change notification settings - Fork 315
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(reporter): Add authors to concluded license #9600
fix(reporter): Add authors to concluded license #9600
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9600 +/- ##
=========================================
Coverage 68.05% 68.06%
- Complexity 1285 1298 +13
=========================================
Files 249 249
Lines 8835 8861 +26
Branches 921 926 +5
=========================================
+ Hits 6013 6031 +18
- Misses 2433 2440 +7
- Partials 389 390 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
75abb71
to
9d51625
Compare
9d51625
to
1a4580f
Compare
053ada6
to
3e6f6f4
Compare
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.
Except for the one comment this change looks good to me. @sschuberth Do you also want to have another look?
875975c
to
e0f75f4
Compare
e0f75f4
to
46e8f36
Compare
Refactor the code to improve reusability and maintainability by extracting the functionality for resolving copyright statements from package authors into a separate function. The extracted function encapsulates the existing logic, making it easier to call from multiple places while reducing duplication. The refactor does not introduce any changes to the existing behavior and serves purely as a structural improvement. Signed-off-by: Wolfgang Klenk <[email protected]>
46e8f36
to
642e3d8
Compare
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.
Just one more typo to fix 😄
@@ -83,6 +83,10 @@ class LicenseInfoResolver( | |||
licenseInfo.concludedLicenseInfo.concludedLicense?.also { | |||
originalExpressions += ResolvedOriginalExpression(expression = it, source = LicenseSource.CONCLUDED) | |||
} | |||
|
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.
Unfortunately, I had a typo in my proposed commit message: "to be mapped to copyright" needs to say "to be mapped to copyrights".
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.
1 typo fixed
…nses As concluded licenses are supposed to trump other licenses, they are usually taken instead of declared and detected licenses in reports. When doing do, and the concluded license is not among the other licenses, any author information that is configured to be mapped to copyrights would be dropped. To prevent that, apply the same author to copyright mapping that is done for declared licenses also for concluded licenses. Fixes oss-review-toolkit#9599. Signed-off-by: Wolfgang Klenk <[email protected]>
Verify that package authors defined in a curation file are added to the concluded license if ORT option `addAuthorsToCopyrights` is enabled. Signed-off-by: Wolfgang Klenk <[email protected]>
642e3d8
to
69f0fa4
Compare
Include authors for package dependencies when both
concluded_license
andauthors
are curated, and ORT is configured with theaddAuthorsToCopyrights
option enabled. This ensures that package authors appear under the respective concluded license in the Disclosure Document.This behaviour applies when the Scanner option
skipConcluded
is enabled, having the effect that the scan stage is skipped for the particular package dependency in this case, and if either the concluded license is different from the declared license or if no license is declared at all.Fixes #9599.