aboutcode-org / aboutcode-org/scancode-toolkit

Support SPDX JSON output format

未關閉
#3,698 2 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
new feature
主要語言
Python
星號
2.6k
分支
791
平均合併
1 天 12 小時
30 天內合併 PR
5

描述

## Short Description

Add support for SPDX JSON as an output format

## Possible Labels

Enhancement
- new feature

## Select Category

- [X] Enhancement
- [ ] Add License/Copyright
- [ ] Scan Feature
- [ ] Packaging
- [ ] Documentation
- [ ] Expand Support
- [ ] Other

## **Describe the Update**

Add support for SPDX JSON. The [tools-python](https://github.com/spdx/tools-python/blob/main/DOCUMENTATION.md#json-yaml-xml-1) library supports JSON - so this may be relatively straightforward to add. Note that it would be very incremental to add support for YAML in the same code update.

## **How This Feature will help you/your organization**

I noticed in a recent review of different tools - [Quality Assessment of SBOM Generation Tools and Standards on Open Source Projects](https://mariuxdeangelo.gitlab.io/website/Masterthesis.pdf) - the scancode SPDX output could not be used in the evaluation due to the lack of JSON support. JSON has become one of the most popular formats used in SPDX 2.3. Adding direct support would likely benefit both scancode and SPDX adoption.

## **Possible Solution/Implementation Details**

From the requirements.txt file, it looks like we are already using version 0.8.1 of the spdx-tools which support JSON output.

It looks like the changes are mostly (if not completely) localized to [output_spdx.py](https://github.com/nexB/scancode-toolkit/blob/develop/src/formattedcode/output_spdx.py) plus any related documentation.

The code would need to be slightly refactored to use an enumeration rather than a Boolean to describe the output format choice for SPDX.

## **Can you help with this Feature**

Although Python is not my primary language of choice, I could provide a pull request if it helps (although it may take a bit longer for a review cycle vs. someone more Python experienced).

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。