Skip to content
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

Update license rules and license detections #3905

Merged
merged 11 commits into from
Sep 26, 2024
Merged

Conversation

AyanSinhaMahapatra
Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra commented Sep 4, 2024

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks... IMHO you cam make the FPs smaller and fewers... And you should FP most if not all of the doc parts that are comments about licensing

AyanSinhaMahapatra and others added 4 commits September 9, 2024 16:18
Added by @DennisClark

Reference: #3908
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Add a new matcher_order attribute to LicenseMatch and use it for sorting
matches rather than the matcher string.
This was we can ensure that there is a proper precedence between
matchers when two matches are matching exactly the same text.

The new sort order for matcher is like that:
- 0: 1-hash
- 1: 2-aho
- 2: 1-spdx-id
- 3: 3-seq
- 4: 5-undetected
- 5: 5-aho-frag
- 6: 6-unknown

The outcome is that a hash or aho match for the same text at the same
position will take precedence of the SPDX id match, allowing to curate
and correct some incorrect license expressions if needed.

Reference: #3912
Reported-by: Ayan Sinha Mahapatra <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are a few nits for your consideration. I often prefer a shorter false positive. Good to merge otherwise.

src/licensedcode/data/rules/false-positive_784.RULE Outdated Show resolved Hide resolved
src/licensedcode/data/rules/false-positive_785.RULE Outdated Show resolved Hide resolved
src/licensedcode/data/rules/false-positive_786.RULE Outdated Show resolved Hide resolved
src/licensedcode/data/rules/false-positive_787.RULE Outdated Show resolved Hide resolved
src/licensedcode/data/rules/false-positive_788.RULE Outdated Show resolved Hide resolved
src/licensedcode/data/rules/false-positive_776.RULE Outdated Show resolved Hide resolved
src/licensedcode/data/rules/false-positive_773.RULE Outdated Show resolved Hide resolved
src/licensedcode/data/rules/false-positive_771.RULE Outdated Show resolved Hide resolved
src/licensedcode/data/rules/false-positive_772.RULE Outdated Show resolved Hide resolved
src/licensedcode/data/rules/false-positive_774.RULE Outdated Show resolved Hide resolved
pombredanne and others added 3 commits September 13, 2024 19:12
Signed-off-by: Philippe Ombredanne <[email protected]>
Reference: #3922
Reported-by: Martin Ba @bilbothebaggins
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
@pombredanne
Copy link
Member

@AyanSinhaMahapatra Thanks!
merging

@pombredanne pombredanne merged commit c83385c into develop Sep 26, 2024
38 checks passed
@pombredanne pombredanne deleted the update-license-rules branch September 26, 2024 11:04
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.

2 participants