aboutcode-org / aboutcode-org/scancode-toolkit
Support SPDX JSON output format
- 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ả
## 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).
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.