Report missing licenses or copyright text.
Required because spdx-rs 0.5.3 added support for SPDX 2.3 documents and made these fields optional.
This commit is contained in:
parent
ce0051a42f
commit
d45eac3d7c
@ -17,9 +17,11 @@ pub(crate) fn collect(
|
||||
|
||||
let mut result = Vec::new();
|
||||
for file in document.file_information {
|
||||
let concluded_license = file.concluded_license.expect("File should have licence info");
|
||||
let copyright_text = file.copyright_text.expect("File should have copyright text");
|
||||
let license = interner.intern(License {
|
||||
spdx: file.concluded_license.to_string(),
|
||||
copyright: file.copyright_text.split('\n').map(|s| s.into()).collect(),
|
||||
spdx: concluded_license.to_string(),
|
||||
copyright: copyright_text.split('\n').map(|s| s.into()).collect(),
|
||||
});
|
||||
|
||||
result.push((file.file_name.into(), license));
|
||||
|
Loading…
Reference in New Issue
Block a user