aboutcode-org / aboutcode-org/scancode-toolkit

MIT license not detected in package.json

Abierto
#3,843 4 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Python
Estrellas
2.6k
Forks
791
Merge medio
1 d 12 h
PR fusionados (30 d)
5

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.