-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
Follow license reference to another file #2616
Conversation
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
Hey! @AyanSinhaMahapatra How we will go about adding same logic for packagecode like we discussed yesterday? |
tests/licensedcode/data/plugin_license/license_reference/scan/license-notice.txt
Outdated
Show resolved
Hide resolved
Also, for packagedcode, say for npm, see here. We have a function converting a list of license declarations to a license-expression. It would have been ideal if we return some form of License Detections here instead of just the expressions (which is WIP), but in a short term we could check first for these kind of license references to file (and report only the license conclusion without the unknown). |
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
29ddb8a
to
4aab0aa
Compare
2ba8f14
to
4559aab
Compare
3200da4
to
d4f1436
Compare
@AyanSinhaMahapatra @pombredanne Please have a look! |
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.
Thanks! beside the review comments, I would also like to see some unit tests for find_reference_licenses
10385da
to
27146ae
Compare
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
27146ae
to
a84b1ed
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.
I have a few final review items for you. Thanks!
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
b8544b1
to
466e375
Compare
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.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... Thank you ++
Only follow license references match an exact filename In #2616 we introduced matching path of referenced_filenames based on matching filename or path suffix. This removes path suffix matching which is problematic. Before this we were using .endswith(path) and this led to weird and incorrect license dereferences Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: akugarg akanksha.garg2k@gmail.com
Fixes #1364
Tasks
Run tests locally to check for errors.