{"record":{"id":"fcfb8931d584f126","repo":"GitoxideLabs/gitoxide","slug":"json-output-isn-t-implemented-yet-fcfb89","errorCode":null,"errorMessage":"JSON output isn't implemented yet","messagePattern":"JSON output isn't implemented yet","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/repository/attributes/validate_baseline.rs","lineNumber":45,"sourceCode":"    use crate::{\n        OutputFormat,\n        repository::attributes::{query::attributes_cache, validate_baseline::Options},\n    };\n\n    pub fn validate_baseline(\n        repo: gix::Repository,\n        paths: Option<impl Iterator<Item = BString> + Send + 'static>,\n        mut progress: impl gix::NestedProgress + 'static,\n        mut out: impl io::Write,\n        mut err: impl io::Write,\n        Options {\n            format,\n            statistics,\n            mut ignore,\n        }: Options,\n    ) -> anyhow::Result<()> {\n        if format != OutputFormat::Human {\n            bail!(\"JSON output isn't implemented yet\");\n        }\n\n        if repo.is_bare() {\n            writeln!(\n                err,\n                \"Repo at '{repo}' is bare - disabling git-ignore baseline as `git check-ignore` needs a worktree\",\n                repo = repo.path().display()\n            )\n            .ok();\n            ignore = false;\n        }\n        let mut num_entries = None;\n        let paths = paths.map_or_else(\n            {\n                let repo = repo.clone();\n                let num_entries = &mut num_entries;\n                move || -> anyhow::Result<_> {\n                    let index = repo.index_or_load_from_head()?.into_owned();","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/attributes/validate_baseline.rs#L27-L63","documentation":"Guard clause at the top of `attributes::validate_baseline`, the plumbing command that validates gitattributes against a baseline. Like most gitoxide-core plumbing commands, only human-readable output is implemented; if the caller selects any other OutputFormat (e.g. JSON) the function bails immediately before doing any work. It fires purely from user format selection and indicates a missing feature, not a data problem — no JSON serializer exists for attribute validation results.","triggerScenarios":"Calling `repository::attributes::validate_baseline` with `format == OutputFormat::Json` (or any non-Human variant) via the corresponding CLI flag.","commonSituations":"CI pipelines requesting JSON reports from baseline validation; tooling that assumes all subcommands emit JSON.","solutions":["Run with human output and parse the text report","Capture the mismatch listing written to stderr and format it yourself","File/track an upstream feature request for JSON baseline validation output"],"exampleFix":"// before\nvalidate_baseline(repo, repo_path, out, err, Options { format: OutputFormat::Json, .. })?;\n// after\nvalidate_baseline(repo, repo_path, out, err, Options { format: OutputFormat::Human, .. })?;","handlingStrategy":"validation","validationCode":"if format != OutputFormat::Human {\n    eprintln!(\"validate-baseline: JSON not implemented; using Human\");\n    format = OutputFormat::Human;\n}","typeGuard":null,"tryCatchPattern":"match validate_baseline(repo, repo_path, out, err, opts) {\n    Err(e) if e.to_string().contains(\"JSON output isn't implemented\") => {\n        // rerun with Human format\n    }\n    other => other?,\n}","preventionTips":["Request Human output for baseline validation","Post-process stderr text reports if structured data is needed","Track upstream JSON support before wiring CI to it"],"tags":["cli","json","output-format","unsupported-feature"],"backgroundTag":"operation-not-supported","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}