aboutcode-org / aboutcode-org/scancode-toolkit

Rust Members files are not detected properly

Đang mở
#3,895 0 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

Rust Workspace member files are not detected properly, eg https://github.com/iron/iron
In a codebase having this tree structure
```shell
.
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE
├── README.md
├── iron
│   ├── Cargo.toml
│   └── src
├── logger
│   ├── CONTRIBUTING.md
│   ├── Cargo.toml
│   ├── LICENSE
│   ├── README.md
│   ├── examples
│   └── src
├── mount
│   ├── Cargo.toml
│   ├── README.md
│   ├── examples
│   └── src
├── persistent
│   ├── Cargo.toml
│   ├── README.md
│   ├── examples
│   └── src
└── router
├── Cargo.toml
├── README.md
├── examples
└── src
```
The files like LICENSE inside the `logger` member is not detected properly as it has no `for_package` attribute associated with it
```json
{
"path": "iron-master.zip-extract/iron-master/logger/LICENSE",
"type": "file",
"name": "LICENSE",
"base_name": "LICENSE",
"extension": "",
"size": 1070,
"date": "2021-03-12",
"sha1": "7d3c0b5b44cba5c71e617e8da93529bc7cdc97b1",
"md5": "d0e069410387ade12a0e004a9390b370",
"sha256": "1d9c2bd0d5ac90f0265225209f0c29ee12611effbb6015fec6e98c4adc53fa0e",
"mime_type": "text/plain",
"file_type": "ASCII text",
"programming_language": null,
"is_binary": false,
"is_text": true,
"is_archive": false,
"is_media": false,
"is_source": false,
"is_script": false,
"package_data": [],
"for_packages": [],
"is_legal": true,
"is_manifest": false,
"is_readme": false,
"is_top_level": false,
"is_key_file": false,
"detected_license_expression": "mit",
"detected_license_expression_spdx": "MIT",
"license_detections": [
{
"license_expression": "mit",
"license_expression_spdx": "MIT",
"matches": [
{
"license_expression": "mit",
"spdx_license_expression": "MIT",
"from_file": "iron-master.zip-extract/iron-master/logger/LICENSE",
"start_line": 1,
"end_line": 1,
"matcher": "2-aho",
"score": 100.0,
"matched_length": 4,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "mit_26.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_26.RULE"
},
{
"license_expression": "mit",
"spdx_license_expression": "MIT",
"from_file": "iron-master.zip-extract/iron-master/logger/LICENSE",
"start_line": 5,
"end_line": 21,
"matcher": "2-aho",
"score": 100.0,
"matched_length": 161,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "mit.LICENSE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE"
}
],
"identifier": "mit-86fcf017-3572-9813-b7e8-0a10ec4a120f"
}
],
"license_clues": [],
"percentage_of_license_text": 97.63,
"copyrights": [
{
"copyright": "Copyright (c) 2014 iron",
"start_line": 3,
"end_line": 3
}
],
"holders": [
{
"holder": "iron",
"start_line": 3,
"end_line": 3
}
],
"authors": [],
"emails": [],
"urls": [],
"files_count": 0,
"dirs_count": 0,
"size_count": 0,
"scan_errors": []
},
```
and hence create issue in creating `package_summary`

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.