{"record":{"id":"037b0288d724e545","repo":"oxc-project/oxc","slug":"missing-version-x-y-z-or-version-next","errorCode":null,"errorMessage":"missing `version = \"x.y.z\"` or `version = \"next\"` in `declare_oxc_lint!`","messagePattern":"missing `version = \"x\\.y\\.z\"` or `version = \"next\"` in `declare_oxc_lint!`","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/oxc_macros/src/declare_oxc_lint.rs","lineNumber":201,"sourceCode":"                    if input.peek(Token!(=)) || fix.is_some() {\n                        return Err(Error::new_spanned(key, \"unexpected key in rule declaration\"));\n                    }\n                    // fix kind shorthand, e.g. `dangerous-suggestion``\n                    fix.replace(key);\n                }\n            }\n        }\n\n        let remaining = input.parse::<proc_macro2::TokenStream>()?;\n        if !remaining.is_empty() {\n            return Err(Error::new_spanned(\n                remaining,\n                \"unexpected tokens in rule declaration, missing a comma?\",\n            ));\n        }\n\n        let Some(version) = version else {\n            return Err(Error::new(\n                struct_name.span(),\n                \"missing `version = \\\"x.y.z\\\"` or `version = \\\"next\\\"` in `declare_oxc_lint!`\",\n            ));\n        };\n\n        // Validate that any markdown fenced code blocks (```) in rule docs are properly closed.\n        // If the total number of fences found is odd, a block was not closed.\n        #[cfg(feature = \"ruledocs\")]\n        if !backtick_fences_count.is_multiple_of(2) {\n            return Err(Error::new(\n                struct_name.span(),\n                \"unclosed markdown code block in documentation, please close all ``` fences\",\n            ));\n        }\n        #[cfg(feature = \"ruledocs\")]\n        let Some(documentation) = documentation else {\n            return Err(Error::new(\n                struct_name.span(),","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/oxc-project/oxc/blob/a3d33dda7cb69da23db4fcaa2c0c05de61e760a1/crates/oxc_macros/src/declare_oxc_lint.rs#L183-L219","documentation":"Compile-time error raised inside the declare_oxc_lint! proc-macro parse function when a rule declaration omits the required version attribute. Every lint rule must record the oxc version it shipped in (or \"next\" for unreleased), so the macro refuses to generate the rule metadata without it.","triggerScenarios":"Thrown at crates/oxc_macros/src/declare_oxc_lint.rs:181 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add version = \"next\" to the declare_oxc_lint! block for unreleased rules","Or set version = \"x.y.z\" matching the release the rule ships in"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a3d33dda7cb69da23db4fcaa2c0c05de61e760a1","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}