aboutcode-org / aboutcode-org/scancode-toolkit

MIT license not detected in package.json

Đang mở
#3,843 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
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ả

### Description

From the following file ScanCode does not extract "MIT" license when running ScanCode **without** --package option:
https://github.com/components/font-awesome/blob/f4f114c4ab37d101e6a15370769bc0af681792fa/package.json

```
scanner:
name: "ScanCode"
version: "32.1.0"
configuration: "--copyright --license --license-text --info --strip-root --timeout\
\ 600 --json-pp"
summary:
start_time: "2024-06-28T10:59:46.000199521Z"
end_time: "2024-06-28T11:01:51.000822060Z"
licenses:
- license: "CC-BY-4.0"
location:
path: "package.json"
start_line: 10
end_line: 11
- license: "OFL-1.1"
location:
path: "package.json"
start_line: 13
end_line: 13
score: 50.0
```

This is also reflected by the result of scancode.io which reports:

```
"path": "codebase/font-awesome-f4f114c4ab37d101e6a15370769bc0af681792fa/package.json",
"type": "file",
"name": "package.json",

...

"detected_license_expression": "cc-by-4.0 AND ofl-1.1",
"detected_license_expression_spdx": "CC-BY-4.0 AND OFL-1.1",
"license_detections": [
{
"license_expression": "cc-by-4.0 AND ofl-1.1",
"license_expression_spdx": "CC-BY-4.0 AND OFL-1.1",
"matches": [
{
"license_expression": "cc-by-4.0",
"spdx_license_expression": "CC-BY-4.0",
"from_file": "codebase/font-awesome-f4f114c4ab37d101e6a15370769bc0af681792fa/package.json",
"start_line": 10,
"end_line": 11,
"matcher": "2-aho",
"score": 100.0,
"matched_length": 5,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "cc-by-4.0_103.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/cc-by-4.0_103.RULE",
"matched_text": " \"license\": [\n \"CC-BY-4.0\","
},
{
"license_expression": "ofl-1.1",
"spdx_license_expression": "OFL-1.1",
"from_file": "codebase/font-awesome-f4f114c4ab37d101e6a15370769bc0af681792fa/package.json",
"start_line": 13,
"end_line": 13,
"matcher": "2-aho",
"score": 50.0,
"matched_length": 3,
"match_coverage": 100.0,
"rule_relevance": 50,
"rule_identifier": "spdx_license_id_ofl-1.1_for_ofl-1.1.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_ofl-1.1_for_ofl-1.1.RULE",
"matched_text": " \"OFL-1.1\""
}
],
"identifier": "cc_by_4_0_and_ofl_1_1-bbdb0005-3895-360f-06e7-55f139405d2f"
}
],
```

### How To Reproduce

Run ScanCode 32.1.0 via ORT 22.5.0

### System configuration

* What OS are you running on? (Windows/MacOS/Linux)
Linux
* What version of scancode-toolkit was used to generate the scan file?
32.1.0
* What installation method was used to install/run scancode? (pip/source download/other)
PIP in ORT

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.