{"record":{"id":"9633fce5e743f179","repo":"astral-sh/ruff","slug":"missing-documentation-for-field","errorCode":null,"errorMessage":"Missing documentation for field","messagePattern":"Missing documentation for field","errorType":"exception","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/ruff_macros/src/config.rs","lineNumber":165,"sourceCode":"                    ..\n                }),\n            ..\n        }) => Ok(lit_str.value()),\n        _ => Err(syn::Error::new(doc.span(), \"Expected doc attribute.\")),\n    }\n}\n\n/// Parse an `#[option(doc=\"...\", default=\"...\", value_type=\"...\",\n/// example=\"...\")]` attribute and return data in the form of an `OptionField`.\nfn handle_option(field: &Field, attr: &Attribute) -> syn::Result<proc_macro2::TokenStream> {\n    let docs: Vec<&Attribute> = field\n        .attrs\n        .iter()\n        .filter(|attr| attr.path().is_ident(\"doc\"))\n        .collect();\n\n    if docs.is_empty() {\n        return Err(syn::Error::new(\n            field.span(),\n            \"Missing documentation for field\",\n        ));\n    }\n\n    // Convert the list of `doc` attributes into a single string.\n    let doc = dedent(\n        &docs\n            .into_iter()\n            .map(parse_doc)\n            .collect::<syn::Result<Vec<_>>>()?\n            .join(\"\\n\"),\n    )\n    .trim_matches('\\n')\n    .to_string();\n\n    let ident = field\n        .ident","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/astral-sh/ruff/blob/26f38c119cac42e4d320ba08f09224fdec74af2c/crates/ruff_macros/src/config.rs#L147-L183","documentation":"A syn compile error from handle_option in the ConfigurationOptions derive: the field has no #[doc ...] attributes at all. Every option field must carry documentation because it feeds the generated settings reference.","triggerScenarios":"Thrown at crates/ruff_macros/src/config.rs:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a /// doc comment describing the option","Run cargo dev generate-all after documenting to regenerate docs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"26f38c119cac42e4d320ba08f09224fdec74af2c","analyzedAt":"2026-09-05T10:32:37.492Z","contentChangedAt":"2026-09-05T10:32:37.492Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}