Improve license detection accuracy - #2667
Merged
Merged
Conversation
Prior to this fix, in the set matching step of license detection, the ranking (and deduplication) of candidates eligible for actual full sequence matching was ignoring the rule length and only privileging the matched length, ressemblance and containment. In case of a tie between two candidate rules it makes sense to privilege the longest rule which is what this commit does. Reported-by: Peter Gardfjäll <peter.gardfjall.work@gmail.com> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Reported-by: Shivam Sandbhor <shivam.sandbhor@gmail.com> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
It is now passing correctly Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
There are a few variations introduced by changing how the license sets are ranked. This is fixing it. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Prior to this fix, in the set matching step of license detection, the ranking (and deduplication) of candidates eligible for actual full sequence matching was ignoring the rule length and only privileging the matched length, ressemblance and containment. In case of a tie between two candidate rules it makes sense to privilege the longest rule which is what this commit does. Reported-by: Peter Gardfjäll <peter.gardfjall.work@gmail.com> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Reported-by: Shivam Sandbhor <shivam.sandbhor@gmail.com> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
It is now passing correctly Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
There are a few variations introduced by changing how the license sets are ranked. This is fixing it. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
We are checking that there are no "unknown-license-reference" and reviewing this failure was difficult. This makes it very clear and easy to find where there are "unknown-license-reference" detections. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Somehow 4d630bf made this aspect of rule generation regress. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
The difference between GPL 2 and GPL 3 may be only one digit and this is what this rule and minimum-coverage update attempts to deal with in a specific case. Eventually teh solution is to implement #2637 Reported-by: John Horan <jmhoran@nexb.com> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Expression validation errors were reported in a subpar way which made it hard to trace. This is fixing this Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
It is not needed for longer rules above the 18 words threshold. And it was confusing to always add this as 100 when not needed Reported-by: Mikko Murto <mikko.murto@gmail.com> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This is will show up in headers as:
"extra_data": {"SPDX-license-list-version": "3.14"}
Reported-by: Armijn Hemel @armijnhemel
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Reported-by: Emil Gydesen <emil.gydesen@nordicsemi.no> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This updates and refines various license metadata Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This batch of new licenses comprise several Linux firmware licenses, and several license recently met in the wild. Reported-by: Dennis Clark <dmclark@nexb.com> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Better deal with explicit lits of exceptional cases that need no sync. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
It has been yanked. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
- Use lower case variables. - Ensure this is also reported with the --version CLI option - Add version to the SPDX outputs - Update tests with SPDX list version Reported-by: Armijn Hemel @armijnhemel Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
The previous commit was incorrectly handling stored relevance. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Contributed-by: Dennis Clark <dmclark@nexb.com> Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
The computation was a bit unlcear. This improves code clarity Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Update relervance, minimu coverage and license expressions Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Also some public-domain Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Most short rules should have a fairly gigh relevance. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This is a notice found in lzma Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
The latest license rules updates fixed this failure. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
These tests are now passing and were previously expected failures Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
We now properly detect a CC0-1.0 and not a combo of CC0-1.0 and public domain Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Member
Author
|
This is all green at last and a massive improvement... so I am merging. |
This file contains hidden or 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
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.
No description provided.