-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
More License Detection changes #3154
Merged
Merged
Conversation
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
- Add a new codebase level attribute `licenses` - Add a new resource level attribute `for_licenses` - Add unique license detections from files and packages in the top level attribute `licenses` and this is the usual `license_expression`, `detection_log` and `matches` and additionally an `occurance_count` and a `identifier` which is an UUID generated from the content of the matches in the detection. Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
pombredanne
requested changes
Nov 21, 2022
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 some comments inline for your review.
tests/cluecode/data/plugin_email_url/urls-threshold.expected.json
Outdated
Show resolved
Hide resolved
* removes the `--licenses-reference` CLI option and plugin * the license_references and license_rule_references attributes are now default with `--license` option and the same has been removed from match level data to avoid data duplication. * tests are reorganized and files renamed Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
* Due to license references being default, reference data isn't inlined anymore, so we need to use the cache to get this data and also rehydrate them into objects to be able to post process license related info. * Use license objects wherever possible instead of mappings. Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
* rename top level attirbute `licenses` -> `license_detections` * rename top level attribute `rule_references` to `license_rule_references` * include license_expression in identifier * use the correct spelling for occurrance * include matched_text in matches instead of reference data * file level attribute `for_licenses` changed to `for_license_detections` * fix bugs including license rule references correctly * make license references default to `--licenses` Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
* Reorder codebase and resource level attributes * replace `#` in license detection identifier with `-` * regenerate test expectations * reorder license rule references attributes * add rule text to license rule references data Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
* Add rule text to reference data * Add rule url to reference data * make rule references unique * reorder rule references data * regenerate test expectations Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
AyanSinhaMahapatra
changed the title
More License Detection changes [WIP]
More License Detection changes
Dec 20, 2022
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
#3150 now has all the changes from this PR. |
pombredanne
reviewed
Dec 24, 2022
pombredanne
approved these changes
Dec 24, 2022
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! merging!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
licenses
attribute with unique license detectionsTasks
Run tests locally to check for errors.