{"record":{"id":"7dc5c56c4b2213dc","repo":"linera-io/linera-protocol","slug":"unknown-output-format-other-expected-json-yam","errorCode":null,"errorMessage":"unknown output format `{other}` (expected json|yaml|md|brief)","messagePattern":"unknown output format `(.+?)` \\(expected json\\|yaml\\|md\\|brief\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"linera-service/src/cli/validator_benchmark/report.rs","lineNumber":75,"sourceCode":"        }\n        if out.is_empty() {\n            return Err(anyhow!(\"--output specified but resolved to no entries\"));\n        }\n        Ok(out)\n    }\n\n    fn parse_one(s: &str) -> Result<OutputSpec> {\n        let (fmt_str, target) = match s.split_once(':') {\n            Some((f, p)) => (f, Target::File(PathBuf::from(p))),\n            None => (s, Target::Stdout),\n        };\n        let format = match fmt_str {\n            \"json\" => Format::Json,\n            \"yaml\" => Format::Yaml,\n            \"md\" => Format::Md,\n            \"brief\" => Format::Brief,\n            other => {\n                return Err(anyhow!(\n                    \"unknown output format `{other}` (expected json|yaml|md|brief)\"\n                ))\n            }\n        };\n        Ok(OutputSpec { format, target })\n    }\n}\n\n/// Top-level benchmark report.\n#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct Report {\n    pub metadata: Metadata,\n    pub layers: Layers,\n}\n\n#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct Metadata {\n    pub tool_version: String,","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-service/src/cli/validator_benchmark/report.rs#L57-L93","documentation":"The format token of an --output spec is not one of the four supported formats. Each spec is FORMAT:TARGET and the format must be exactly json, yaml, md, or brief (case-sensitive); anything else fails before the target path is touched.","triggerScenarios":"`--output csv:report.csv`, capitalized tokens like `JSON:report.json`, or a spec missing its separator so the whole string lands in the format slot.","commonSituations":"Assuming a generic format list; copy-pasting output flags from a different tool; typos like 'yml' instead of 'yaml' or 'markdown' instead of 'md'.","solutions":["Use one of the exact lowercase tokens: json, yaml, md, brief.","Remember yml is not accepted — spell it yaml.","Keep the FORMAT:TARGET shape with a single colon (a path with a drive letter or extra colons will confuse the split).","Check the flag for stray whitespace between the format and the colon."],"exampleFix":"# before\n--output csv:report.csv\n--output JSON:report.json\n\n# after\n--output json:report.json\n--output md:report.md","handlingStrategy":"type-guard","validationCode":"fn is_known_output_format(s: &str) -> bool {\n    matches!(s, \"json\" | \"yaml\" | \"md\" | \"brief\")\n}","typeGuard":"fn is_known_output_format(s: &str) -> bool {\n    matches!(s, \"json\" | \"yaml\" | \"md\" | \"brief\")\n}","tryCatchPattern":null,"preventionTips":["Use exact lowercase tokens; note yml is invalid — it is yaml.","Keep the FORMAT:TARGET shape with exactly one colon before the path."],"tags":["cli","parsing","output","format"],"backgroundTag":"invalid-cli-argument-format","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}