Skip to content

Commit d45eac3

Browse files
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.
1 parent ce0051a commit d45eac3

File tree

1 file changed

+4
-2
lines changed
  • src/tools/collect-license-metadata/src

1 file changed

+4
-2
lines changed

src/tools/collect-license-metadata/src/reuse.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ pub(crate) fn collect(
1717

1818
let mut result = Vec::new();
1919
for file in document.file_information {
20+
let concluded_license = file.concluded_license.expect("File should have licence info");
21+
let copyright_text = file.copyright_text.expect("File should have copyright text");
2022
let license = interner.intern(License {
21-
spdx: file.concluded_license.to_string(),
22-
copyright: file.copyright_text.split('\n').map(|s| s.into()).collect(),
23+
spdx: concluded_license.to_string(),
24+
copyright: copyright_text.split('\n').map(|s| s.into()).collect(),
2325
});
2426

2527
result.push((file.file_name.into(), license));

0 commit comments

Comments
 (0)