aboutcode-org / aboutcode-org/scancode-toolkit

`free-unknown` should be dismissed as license clues when there are other proper detections in the file

Đang mở
#4,361 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
improve-license-detection
Ngôn ngữ chính
Python
Star
2.6k
Fork
791
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
5

Mô tả

```
This plugin was created in [Realytics](https://www.realytics.io/) in 2017. Thank you for supporting Open Source.

## License

MIT License
```
License detection yeilds `free-unknown AND mit` for the above text.

The `free-unknown` is from
```
"license_expression": "free-unknown",
"license_expression_spdx": "LicenseRef-scancode-free-unknown",
"from_file": "code/fork-ts-checker-webpack-plugin-6.5.3.tgz-extract/package/README.md",
"start_line": 434,
"end_line": 436,
"matcher": "2-aho",
"score": 50,
"matched_length": 3,
"match_coverage": 100,
"rule_relevance": 50,
"rule_identifier": "free-unknown_88.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown_88.RULE",
"matched_text": "Open Source.\n\n## License",
"matched_text_diagnostics": "Open Source.\n\n## License"
```

Another sample:
`busybox-1.37.0/networking/ssl_helper/ssl_helper.c`

```
- score: '100.0'
matcher: 2-aho
end_line: 8
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown_7.RULE
from_file:
start_line: 8
matched_text: ' * This software is open source; you can redistribute it and/or modify'
match_coverage: '100.0'
matched_length: 5
rule_relevance: 100
rule_identifier: free-unknown_7.RULE
license_expression: free-unknown
license_expression_spdx: LicenseRef-scancode-free-unknown
- score: '94.06'
matcher: 3-seq
end_line: 19
rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_573.RULE
from_file:
start_line: 8
matched_text: |
* This software is open source; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
match_coverage: '94.06'
matched_length: 95
rule_relevance: 100
rule_identifier: gpl-2.0-plus_573.RULE
license_expression: gpl-2.0-plus
license_expression_spdx: GPL-2.0-or-later
```

The `free-unknown` is detected from the same starting line of the detected gpl-2.0-plus license notice.

It'll be great if it can remove the `free-unknown` from the detection to prevent noise.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.