Skip to main content

Module diagnostics

Module diagnostics 

Source

Structs§

AnalysisDiagnostic

Enums§

DiagnosticKind
DiagnosticSeverity
Severity for analysis-emitted diagnostics. The analyser populates it for every diagnostic — lex-lsp reads diag.severity directly when mapping onto the LSP wire. (Earlier the LSP layer derived severity from DiagnosticKind; that mapping moved upstream once the extension-emitted diagnostics needed per-instance severities.)
SchemaValidationKind
One of the six schema pre-validation checks the analyser owns before dispatching to a handler. Wire spec / proposal §13.2.

Functions§

analyze
Run the analyser without an extension registry — equivalent to running with an empty registry. Provided for callers that haven’t adopted the extension system yet.
analyze_with_registry
Run the analyser with a populated extension registry. Labels whose namespace is registered get pre-validated against their schema and, if pre-validation passes, dispatched to the handler’s on_validate hook. Handler-emitted diagnostics are merged into the same stream as the built-in checks.