aboutcode-org / aboutcode-org/scancode-toolkit

Support reporting unknown SPDX LicenseRef as their own license

未关闭
#2,650 1 条评论 0 个 reaction 已指派 1 人 已被 @AyanSinhaMahapatra 认领 在 GitHub 查看
new feature
主要语言
Python
星标
2.6k
派生
791
平均合并
1 天 12 小时
30 天内合并 PR
5

描述

This is split from https://github.com/nexB/scancode-toolkit/issues/2502#issuecomment-864386537

In there @soimkim wrote

> I also have a similar issue.
I want to print the items marked with SPDX License, but the ScanCode json result is output as follows.

- Information written to the file:
`# SPDX-License-Identifier: LicenseRef-Sample-Proprietary`

- ScanCode json result :
```JSON
"licenses": [
{
"key": "unknown-spdx",
"score": 83.33,
"name": "Unknown SPDX license detected but not recognized",
"short_name": "unknown SPDX",
"category": "Unstated License",
"is_exception": false,
"owner": "Unspecified",
"homepage_url": null,
"text_url": "",
"reference_url": "https://scancode-licensedb.aboutcode.org/unknown-spdx",
"scancode_text_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown-spdx.LICENSE",
"scancode_data_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown-spdx.yml",
"spdx_license_key": "LicenseRef-scancode-unknown-spdx",
"spdx_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/unknown-spdx.LICENSE",
"start_line": 3,
"end_line": 3,
"matched_rule": {
"identifier": "spdx-license-identifier: unknown-spdx",
"license_expression": "unknown-spdx",
"licenses": [
"unknown-spdx"
],
```

>Although it is not a license registered in SPDX, is there a way to print the License ID ("Sample-Proprietary" in the example above) if it is written according to the notation of the SPDX License?

>If "key" extracted as "unknown-spdx", how about outputting "identifier" in "matched_rule" as License ID written?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。