{"record":{"id":"87ff900fea7b5952","repo":"jdx/mise","slug":"idiomatic-version-files-markers-are-reversed","errorCode":null,"errorMessage":"idiomatic version files markers are reversed","messagePattern":"idiomatic version files markers are reversed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/render_help.rs","lineNumber":41,"sourceCode":"            cmd!(\"prettier.cmd\", \"--write\", \"docs/.vitepress/cli_commands.ts\").run()?;\n        } else {\n            cmd!(\"prettier\", \"--write\", \"docs/.vitepress/cli_commands.ts\").run()?;\n        }\n        Ok(())\n    }\n}\n\nfn render_idiomatic_version_files() -> Result<()> {\n    let path = \"docs/configuration.md\";\n    let content = file::read_to_string(path)?;\n    let start = content\n        .find(IDIOMATIC_FILES_START)\n        .wrap_err(\"missing idiomatic version files start marker\")?\n        + IDIOMATIC_FILES_START.len();\n    let end = content\n        .find(IDIOMATIC_FILES_END)\n        .wrap_err(\"missing idiomatic version files end marker\")?;\n    ensure!(start <= end, \"idiomatic version files markers are reversed\");\n\n    let table = render_idiomatic_version_files_table();\n    let rendered = format!(\n        \"{}\\n\\n{}\\n\\n{}\",\n        &content[..start],\n        table.trim(),\n        &content[end..]\n    );\n    file::write(path, rendered)?;\n    Ok(())\n}\n\nfn render_idiomatic_version_files_table() -> String {\n    let rows = registry::baked_registry()\n        .iter()\n        .filter(|(plugin, tool)| *plugin == tool.short && !tool.idiomatic_files.is_empty())\n        .map(|(plugin, tool)| {\n            let files = tool","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/render_help.rs#L23-L59","documentation":"Thrown while regenerating the idiomatic version files section of rendered help/docs. The renderer locates IDIOMATIC_FILES_START and IDIOMATIC_FILES_END markers in the template; if the start marker appears after the end marker, the slice would be invalid, so it bails. This guards against corrupted or hand-edited template content.","triggerScenarios":"Calling render_idiomatic_version_files (part of `mise render:help`-style rendering) when the source document's start marker is positioned after the end marker, or markers are duplicated/misplaced.","commonSituations":"Manual edits to the help template reordered or deleted markers, a merge conflict left markers out of order, or marker constants changed while the template did not.","solutions":["Open the template containing the markers and ensure IDIOMATIC_FILES_START occurs before IDIOMATIC_FILES_END exactly once each","Restore the template section from git history (git checkout / revert the bad edit)","Resolve any leftover merge-conflict markers around the section","Regenerate docs with `mise run render:help` after fixing the markers"],"exampleFix":"// before (template)\n<!-- end idiomatic files -->\n<!-- start idiomatic files -->\n// after\n<!-- start idiomatic files -->\n...content...\n<!-- end idiomatic files -->","handlingStrategy":"validation","validationCode":"grep -n \"start idiomatic\" docs/help-template.md && grep -n \"end idiomatic\" docs/help-template.md # start line must be < end line, each once","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not hand-edit marker-delimited generated sections in help templates","Re-run `mise run render:help` after template edits and commit the output","Resolve merge conflicts in templates before rendering","Keep marker comments on single, unmodified lines"],"tags":["docs","rendering","template-markers","internal"],"backgroundTag":"invalid-state-transition","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}