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

Got "CC-BY-NC-SA-3.0 AND CC-BY-SA-3.0" for file mentioning elements under CC-BY-SA-3.0 #3615

Open
camillem opened this issue Dec 1, 2023 · 7 comments · May be fixed by #3644
Open

Got "CC-BY-NC-SA-3.0 AND CC-BY-SA-3.0" for file mentioning elements under CC-BY-SA-3.0 #3615

camillem opened this issue Dec 1, 2023 · 7 comments · May be fixed by #3644
Labels

Comments

@camillem
Copy link
Contributor

camillem commented Dec 1, 2023

Description

Not sure if this is a bug, but an issue, at least for me.
When scanning the attached custom-content.html file (attached) , I get "CC-BY-NC-SA-3.0 AND CC-BY-SA-3.0" for detected_license_expression_spdx, while the content only refers to elements under CC-BY-SA-3.0. (see attached json file)

How To Reproduce

git checkout v32.0.8
./configure
source venv/bin/activate
scancode -h
scancode --license --copyright --json-pp scancode_result.json custom-content.html 

System configuration

For bug reports, it really helps us to know:

  • What OS are you running on? Ubuntu 22.04.3 LTS
  • What version of scancode-toolkit was used to generate the scan file? v32.0.8
  • What installation method was used to install/run scancode? source download

custom-content.html.txt

scancode_result.json

@camillem camillem added the bug label Dec 1, 2023
@pombredanne
Copy link
Member

Thanks for the report. I will make a dedicated fix commit to show what the simple fix is FWIW.

@dotarjun
Copy link

dotarjun commented Dec 1, 2023

Hey do you mind if I give this a shot?

@pombredanne
Copy link
Member

@dotarjun sure thing! please do and thank you.

@pombredanne
Copy link
Member

@dotarjun here is a change that may fix things:
In src/licensedcode/data/rules/cc-by-nc-sa-3.0_22.RULE add double curly braces to make a part a "key phrase":

---
license_expression: cc-by-nc-sa-3.0
is_license_notice: yes
relevance: 100
ignorable_urls:
    - http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US
---

This book is licensed under a Creative Commons 
http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US [{{Attribution-NonCommercial-ShareAlike 3.0}} Unported] license. 
For more information, please see the Creative Commons page.

@AyanSinhaMahapatra
Copy link
Member

@dotarjun ping!

@dotarjun
Copy link

Hey, I totally missed this. I'll push the change asap

@dotarjun dotarjun linked a pull request Jan 18, 2024 that will close this issue
6 tasks
dotarjun added a commit to dotarjun/scancode-toolkit that referenced this issue Jan 19, 2024
Reference: aboutcode-org#3615
Reported-by: @camillem

Signed-off-by: dotarjun <[email protected]>
@camillem
Copy link
Contributor Author

camillem commented Feb 6, 2024

Thanks for the quick fix :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants