aboutcode-org / aboutcode-org/scancode-toolkit

stream JSON lines output

Đang mở
#3,619 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
new feature
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

The current JSON lines feature doesn't write information to a file (or stdout) until scancode has completely finished. It might be useful to start writing results earlier. This should be possible (except for the aggregated information in `license_detections`) as all files are scanned independently (I suppose).

## Possible Labels

- new feature

## Select Category

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

## **Describe the Update**

I want a JSON lines feature that starts writing results to output earlier. As every file is scanned independently this should be possible. The `license_detections` aggregated information could be written last as an "end of stream" token.

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

I want to be able to track progress. Also, I might want to pipe output to another program that processes scancode information without me having to wait until scancode has completely finished. This feature might also help reducing memory usage of scancode, because as soon as the data is written it can be discarded (apart from information for `license_detections`).

## **Possible Solution/Implementation Details**

Line 1: start of stream/`headers`
Line 2-n: scan results for each file
Line n+1: end of stream/`license_detections`

## **Example/Links if Any**

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

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.