Expand description
Stable diagnostic code registry.
Codes use HARN-<CATEGORY>-<NNN> identifiers so CLI output, editor
diagnostics, docs, and future harn explain lookups can refer to one
durable namespace.
use harn_parser::diagnostic_codes::Category;
let categories: Vec<_> = Category::ALL.iter().map(|category| category.as_str()).collect();
assert_eq!(
categories,
[
"TYP", "PAR", "NAM", "CAP", "LLM", "ORC", "STD", "PRM",
"MOD", "LNT", "FMT", "IMP", "OWN", "RCV", "MAT",
],
);Structs§
- Parse
Code Error - Error returned when parsing an unknown diagnostic code.
- Parse
Repair Safety Error - Error returned when parsing an unknown repair-safety string.
- Registry
Entry - One registered diagnostic code.
- Repair
- A structured repair proposal attached to a diagnostic.
- Repair
Id - Namespaced kebab-case repair identifier (e.g.
imports/fix-path). - Repair
Template - Static-lifetime repair template bound to a diagnostic code.
Enums§
- Category
- Top-level diagnostic category used in a stable Harn diagnostic code.
- Code
- Stable diagnostic identifier.
- Repair
Safety - Autonomy ceiling of a proposed repair.
Constants§
- REGISTRY
- REPAIR_
REGISTRY - Every distinct repair template registered by
Code::repair_template, in source order. Used by the catalog wire-up in E1.7 and by tests asserting the catalog is healthy.