aboutcode-org / aboutcode-org/scancode-toolkit

Incorrect license detection

未關閉
#3,265 0 則留言 0 個 reaction 已指派 1 人 已被 @AyanSinhaMahapatra 認領 在 GitHub 檢視
bug license scan
主要語言
Python
星號
2.6k
分支
791
平均合併
1 天 12 小時
30 天內合併 PR
5

描述

This, see in https://github.com/foundation/foundation-sites/tree/v6.4.1:
```
/**
* Foundation for Sites by ZURB
* Version 6.4.1
* foundation.zurb.com
* Licensed under MIT Open Source
*/
/*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */
```

This is reported as two matches of `mit` AND another of `gpl-2.0`
```
license_detections:
- license_expression: mit AND gpl-2.0
detection_log:
- not-combined
matches:
- score: '100.0'
start_line: 5
end_line: 5
matched_length: 3
match_coverage: '100.0'
matcher: 2-aho
license_expression: mit
rule_identifier: mit_172.RULE
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_172.RULE
matched_text: Licensed under MIT
- score: '100.0'
start_line: 7
end_line: 7
matched_length: 2
match_coverage: '100.0'
matcher: 2-aho
license_expression: gpl-2.0
rule_identifier: gpl-2.0_818.RULE
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_818.RULE
matched_text: GPLv2 License |
```
but we should have instead detected `mit` AND `mit OR gpl-2.0` and reported a top level expression of `mit OR gpl-2.0`

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。