Skip to content

Improve license detection accuracy - #2667

Merged
pombredanne merged 65 commits into
developfrom
2635-license-accuracy
Sep 15, 2021
Merged

Improve license detection accuracy#2667
pombredanne merged 65 commits into
developfrom
2635-license-accuracy

Conversation

@pombredanne

Copy link
Copy Markdown
Member

No description provided.

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>
@pombredanne

Copy link
Copy Markdown
Member Author

This is all green at last and a massive improvement... so I am merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant