Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Diagnostics conversion from Shape errors to LSP diagnostics

Structs§

LspErrorRenderer
LSP Error Renderer - converts structured errors to LSP Diagnostics

Functions§

borrow_analysis_to_diagnostics
Convert structured MIR borrow errors into LSP diagnostics.
code_description_for
W2.3 / 1.17 — build a CodeDescription for a Shape error code string.
diagnostic_tags_for
W2.3 / 1.19 — derive LSP DiagnosticTags from a shape diagnostic.
enrich_diagnostics_with_code_metadata
W2.3 — backfill code_description (1.17) + tags (1.19) on a diagnostic batch produced by the per-validator pipeline.
error_to_diagnostic
Convert Shape errors to LSP diagnostics
error_to_diagnostic_with_uri
Convert Shape errors to LSP diagnostics with optional URI for structured errors
validate_annotations
Validate annotations in a program and return diagnostics for any issues
validate_async_join
Validate async join usage: await join must be inside an async function.
validate_async_structured_concurrency
Validate structured concurrency constructs (async let, async scope, for await) are only used inside async function bodies.
validate_color_rgb_range
Validate Content API calls.
validate_comptime_builtins_context
Diagnose comptime-only builtins called outside a comptime { } block.
validate_comptime_overrides
Validate type alias overrides: only comptime fields can be overridden.
validate_comptime_side_effects
Warn when a comptime block contains side-effecting expressions.
validate_foreign_function_types
Validate that foreign function parameters and return types are explicitly annotated.
validate_interpolation_format_specs
Validate formatted interpolation specs in f"..." string literals.
validate_trait_bounds
Validate trait bound satisfaction in impl blocks and function type parameters.
validate_unused_imports
W2.3 / 1.19 — detect unused imports and emit W0102 diagnostics tagged with DiagnosticTag::UNNECESSARY (via the metadata enricher).