{"record":{"id":"e6d1ea92d129242a","repo":"slint-ui/slint","slug":"project-is-not-reuse-compliant","errorCode":null,"errorMessage":"Project is not reuse compliant!","messagePattern":"Project is not reuse compliant!","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xtask/src/reuse_compliance_check.rs","lineNumber":34,"sourceCode":"    let home_dir = std::env::var(\"HOME\").context(\"HOME is not set in the environment\")?;\n    Ok(sh.cmd(command).args(args).env(\"PATH\", format!(\"/bin:/usr/bin:{home_dir}/.local/bin\")))\n}\n\npub fn find_reuse() -> Result<PathBuf> {\n    which::which(\"reuse\").context(\"Failed to find reuse\")\n}\n\npub fn reuse_download(sh: &Shell, reuse: &Path) -> Result<String> {\n    cmd(sh, reuse, &[\"download\", \"--all\"])?.read().context(\"Failed to download missing licenses.\")\n}\n\npub fn reuse_lint(sh: &Shell, reuse: &Path) -> Result<()> {\n    let output = cmd(sh, reuse, &[\"lint\"])?.ignore_status().output()?;\n\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    }","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/xtask/src/reuse_compliance_check.rs#L16-L52","documentation":"The REUSE compliance check runs the `reuse lint` tool and, if it exits non-zero, prints its stdout and bails with this error. It means one or more files in the repository lack proper copyright/licensing information per the REUSE specification.","triggerScenarios":"Running the xtask REUSE check (CI or `cargo xtask ...`) after adding new source files without SPDX `SPDX-License-Identifier` and copyright headers, or with files listed inconsistently in `.reuse/dep5`.","commonSituations":"A contributor commits generated files, assets, or new code without license headers; renamed/moved files losing their headers; missing LICENSES/ directory entries for a declared license.","solutions":["Run `reuse lint` locally and fix every file it flags (add SPDX headers or .reuse/dep5 entries)","Re-run the `reuse` tooling (`reuse annotate`) to add missing copyright/license headers to new files","Regenerate symlinks/coverage via the xtask helpers (scan_symlinks / validate_license_directory) before linting"],"exampleFix":"// before (new file without header)\nfn main() {}\n// after\n// Copyright © 2026 Author\n// SPDX-License-Identifier: GPL-3.0-only OR MIT\nfn main() {}","handlingStrategy":"validation","validationCode":"reuse lint || echo \"fix files listed above before pushing\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `reuse lint` locally before every commit","Add SPDX headers via `reuse annotate` when creating files","Cover generated/binary files with .license companions or dep5 entries"],"tags":["license","reuse","ci","compliance"],"backgroundTag":"schema-validation-failed","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"}