Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Rules and diagnostics catalog

Platform spec feature

Rules and diagnostics catalog

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

This feature defines how semantic rules are scheduled and how their findings map to stable diagnostic kinds. The primary implementation roots are beskid_analysis/src/analysis, staged rule modules under analysis/rules/staged, and services that expose diagnostics to CLI/LSP consumers.

  1. Semantic checks run on resolved project state and must produce deterministic diagnostic ordering.
  2. Diagnostic kind identity is anchored in analysis/diagnostic_kinds.rs.
  3. Error-severity diagnostics are compilation blockers in diagnostics-enabled paths.
  4. CLI and LSP surfaces may differ in rendering but must preserve diagnostic kind and source span identity.

Documentation-only findings use stable warning codes W1610–W1615 and W1620–W1625 (see Diagnostic code registry design model). They are computed in beskid_analysis::doc::collect_doc_diagnostics and attached to DocumentAnalysisSnapshot::doc_diagnostics so editors can merge them with staged semantic diagnostics without re-running HIR-heavy rules on the hot path.

  • compiler/crates/beskid_analysis/src/analysis
  • compiler/crates/beskid_analysis/src/analysis/rules/staged
  • compiler/crates/beskid_analysis/src/analysis/diagnostic_kinds.rs
  • compiler/crates/beskid_analysis/src/doc/validate.rs
  • compiler/crates/beskid_analysis/src/services.rs
  • compiler/crates/beskid_lsp/src/diagnostics.rs

No open decisions. Closed choices are normative ADRs under adr/ (D-COMP-SEM-0007D-COMP-SEM-0009); use the reader ADRs tab for expandable detail.