{"record":{"id":"9ddc04027e5b3715","repo":"slint-ui/slint","slug":"no-license-info-for-available","errorCode":null,"errorMessage":"No license info for \"{}\" available","messagePattern":"No license info for \"(.+?)\" available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xtask/src/reuse_compliance_check.rs","lineNumber":48,"sourceCode":"\n    if !output.status.success() {\n        let stdout = String::from_utf8(output.stdout)?;\n        println!(\"{stdout}\");\n        anyhow::bail!(\"Project is not reuse compliant!\");\n    }\n    Ok(())\n}\n\nfn parse_spdx_data(sh: &Shell, reuse: &Path) -> Result<BTreeMap<PathBuf, Vec<String>>> {\n    let output = cmd(sh, reuse, &[\"spdx\"])?.read()?;\n\n    let mut current_filename = String::new();\n    let mut licenses = Vec::new();\n    let mut result = BTreeMap::new();\n\n    fn insert(v: &mut BTreeMap<PathBuf, Vec<String>>, f: &str, l: Vec<String>) -> Result<()> {\n        if l.is_empty() {\n            anyhow::bail!(\"No license info for \\\"{}\\\" available\", f);\n        }\n        v.insert(PathBuf::from(f), l);\n        Ok(())\n    }\n\n    for line in output.lines() {\n        if line.starts_with(\"FileName: \") {\n            if !current_filename.is_empty() {\n                insert(&mut result, &current_filename, licenses)?;\n                licenses = Vec::new();\n            }\n\n            if let Some(stripped) = line.strip_prefix(\"FileName: \") {\n                current_filename = stripped.into();\n            }\n        } else if line.starts_with(\"LicenseInfoInFile: \")\n            && let Some(stripped) = line.strip_prefix(\"LicenseInfoInFile: \")\n        {","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/xtask/src/reuse_compliance_check.rs#L30-L66","documentation":"While parsing `reuse spdx` output, the `insert` helper rejects a file entry that has an empty license list — i.e. the REUSE tool reported the file with no license information at all. The bail names the file so the gap can be fixed.","triggerScenarios":"A file in the repository is tracked by reuse but carries no license tags at all (no SPDX identifier, no dep5 coverage), so its license vector is empty when building the BTreeMap.","commonSituations":"Binary/generated files added without a `.license` companion file or dep5 entry; files matched by reuse's parser but not annotated; ignoring rules in .reuse that skip annotation checks.","solutions":["Add SPDX-License-Identifier and copyright headers to the named file, or a `.reuse/<name>.license` companion file","Add an entry for the file to `.reuse/dep5`","Re-run `reuse spdx` to confirm the file now reports a license before running the xtask check"],"exampleFix":"// before: image.png with no licensing info\n// after: add image.png.license containing:\n// Copyright © 2026 Author\n// SPDX-License-Identifier: MIT","handlingStrategy":"validation","validationCode":"reuse spdx | grep -i \"$FILE\"   # confirm the file reports license(s)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Annotate every tracked file, including assets, with license info","Use .reuse/dep5 for files that cannot carry headers","Re-run reuse spdx after mass renames or file additions"],"tags":["license","reuse","spdx"],"backgroundTag":"missing-required-argument","analyzedSha":"bb937076de3f7919766c1f25e2e969367cf77e9a","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}