-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Report unknown licenses separately. #2578
Conversation
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.
src/scancode/api.py
Outdated
|
||
detected_licenses.extend( | ||
_licenses_data_from_match( | ||
if "unknown" in match.rule.license_expression: |
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.
matches will have a is_unknown
flag you added :P Use that instead of checking the license_eexpression.
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.
Oh yeah! Actually that PR is not yet merged therefore changes were not reflected in this branch which was giving errors, that's why I have used this .
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
9222562
to
5851f1f
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.
Should fix the tests next.
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
9e91a14
to
d514cbb
Compare
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
d514cbb
to
ccf9de4
Compare
Some tests are failing in |
b26a578
to
412ea31
Compare
412ea31
to
908e8a4
Compare
@@ -404,6 +412,7 @@ def create_consolidated_components(resource, codebase, holder_key): | |||
|
|||
c = Consolidation( | |||
core_license_expression=combine_expressions(license_expressions), | |||
other_license_expression = combine_expressions(unknown_expressions), |
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.
No spaces should be present before and after =
in this case.
src/scancode/api.py
Outdated
_licenses_data_from_match( | ||
match=match, | ||
include_text=include_text, | ||
license_text_diagnostics=license_text_diagnostics, | ||
license_url_template=license_url_template) | ||
) | ||
|
||
|
||
if "unknown" in match.rule.license_expression: #TODO: use is_unknown flag instead |
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.
re #TODO: use is_unknown flag instead
when would this happen?
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.
@pombredanne after #2548 is approved and merged, then this could be rebased/merged and the is_unknown
flags introduced there can be used.
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. See my comments inline.
tests/cluecode/data/plugin_filter_clues/filtered-expected2.json
Outdated
Show resolved
Hide resolved
@@ -33,12 +33,12 @@ | |||
"sha256": "408dfe8f9a70ea7bc9feaa9f77fb731ada0c26dc39008fdc5ead52d0442c656f", | |||
"mime_type": "text/plain", | |||
"file_type": "ASCII text", | |||
"programming_language": null, | |||
"programming_language": "verilog", |
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.
This is weird... how is this related to the current PR?
33634cf
to
7c22012
Compare
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
7c22012
to
8f93fda
Compare
@akugarg @AyanSinhaMahapatra should we merge this? or is this no longer relevant based on our latest discussions? |
@pombredanne Yes, this is not relevant anymore. @akugarg Thanks though. |
Signed-off-by: akugarg akanksha.garg2k@gmail.com
Fixes #2574
Tasks
Run tests locally to check for errors.