Skip to main content

Module diagnostic_codes

Module diagnostic_codes 

Source
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§

ParseCodeError
Error returned when parsing an unknown diagnostic code.
ParseRepairSafetyError
Error returned when parsing an unknown repair-safety string.
RegistryEntry
One registered diagnostic code.
Repair
A structured repair proposal attached to a diagnostic.
RepairId
Namespaced kebab-case repair identifier (e.g. imports/fix-path).
RepairTemplate
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.
RepairSafety
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.