aboutcode-org / aboutcode-org/scancode-toolkit

empty files are reported with empty hash in spdx tag/value, that makes it invalid

Đang mở
#2,668 4 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

The generated spdx in tag/value format is invalid, if the scan contained an empty file, e.g. the following part is invalid since it misses the SHA1 hash:

```
131 │ # File
132 │
133 │ FileName: ./public/.keep
134 │ FileChecksum: SHA1:
135 │ LicenseConcluded: NOASSERTION
136 │ LicenseInfoInFile: NONE
137 │ FileCopyrightText: NONE
```

### How To Reproduce

* scan a directory with an empty file
* generate tag/value
* use https://tools.spdx.org/app/validate/ to validate and see the following violation:

![Bildschirmfoto_2021-08-25_21-12-38](https://user-images.githubusercontent.com/1187050/130851110-625c25dc-e869-48f3-b67b-41d03a7dfcf0.png)

### System configuration
v21.8.4

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.