aboutcode-org / aboutcode-org/scancode-toolkit

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

オープン
#4,355 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
2.6k
フォーク
791
平均マージ
1日 12時間
マージ済み PR(30日)
5

説明

### 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`

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。