aboutcode-org / aboutcode-org/scancode-toolkit

Scanner reports a file with license `Apache-2.0` as `ErlPL-1.1`

Đang mở
#4,355 1 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

The scanner reports a file with license `Apache-2.0` as if it had `ErlPL-1.1`.
The confidence score is somewhat low, `28.81`, but there is no mention of the ErlPL license anywhere :)

Our impact is the use of ScanCode indirectly via [ORT](https://github.com/oss-review-toolkit/ort).

Files affected:
- `lib/dialyzer/test/options1_SUITE_data/src/compiler/v3_core.erl`
- `lib/dialyzer/test/options1_SUITE_data/src/compiler/v3_kernel.erl`
- `lib/dialyzer/test/r9c_SUITE_data/src/mnesia/mnesia_log.erl`

### How To Reproduce

1. `git clone https://github.com/erlang/otp.git`
2. `cd otp`
3. `scancode -clpeui --json-pp sample.json lib/dialyzer/test/options1_SUITE_data/src/compiler/v3_core.erl`

The output shows that the file is detected to contain `ErlPL-1.1`:
```json
"license_detections": [
{
"identifier": "apache_2_0_and_erlangpl_1_1-a2566aed-6768-f0bf-d146-11c24e734c13",
"license_expression": "apache-2.0 AND erlangpl-1.1",
"license_expression_spdx": "Apache-2.0 AND ErlPL-1.1",
"detection_count": 1,
"reference_matches": [
{
"license_expression": "apache-2.0",
"license_expression_spdx": "Apache-2.0",
"from_file": "v3_core.erl",
"start_line": 1,
"end_line": 11,
"matcher": "2-aho",
"score": 100.0,
"matched_length": 85,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "apache-2.0_7.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_7.RULE"
},
{
"license_expression": "erlangpl-1.1",
"license_expression_spdx": "ErlPL-1.1",
"from_file": "v3_core.erl",
"start_line": 10,
"end_line": 15,
"matcher": "3-seq",
"score": 28.81,
"matched_length": 34,
"match_coverage": 28.81,
"rule_relevance": 100,
"rule_identifier": "erlangpl-1.1_2.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/erlangpl-1.1_2.RULE"
}
]
}
],
```

### System configuration

* What OS are you running on? `Ubuntu 22.04`
* What version of scancode-toolkit was used to generate the scan file? `32.3.0`
* What installation method was used to install/run scancode? `pip`

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.