Skip to main content

perl_diagnostics/
lib.rs

1#![deny(unsafe_code)]
2#![warn(rust_2018_idioms)]
3#![warn(missing_docs)]
4
5//! Unified diagnostic codes, types, and catalog for Perl LSP.
6//!
7//! This crate consolidates three previously separate diagnostic crates:
8//! - `perl-diagnostics-codes` — stable diagnostic codes, severity, and tags (now `codes` module)
9//! - `perl-lsp-diagnostic-types` — diagnostic model types (Diagnostic, RelatedInformation) (now `types` module)
10//! - `perl-lsp-diagnostic-catalog` — LSP metadata builders for codes (now `catalog` module)
11//!
12//! # Modules
13//!
14//! - [`codes`] — canonical `DiagnosticCode`, `DiagnosticCategory`, `DiagnosticSeverity`, `DiagnosticTag`
15//! - [`types`] — `Diagnostic` and `RelatedInformation` structs; `DiagnosticSeverity` and `DiagnosticTag` are re-exported from [`codes`]
16//! - [`catalog`] — LSP metadata catalog functions
17//!
18//! # Type unification
19//!
20//! `DiagnosticSeverity` and `DiagnosticTag` are single canonical types defined in [`codes`].
21//! The [`types`] module re-exports them so the legacy `types::DiagnosticSeverity` import
22//! path still resolves to the same underlying type.
23//!
24//! # Re-exports
25//!
26//! The crate root re-exports all public items via [`api`].
27
28/// Diagnostic metadata catalog and LSP-facing helpers.
29pub mod catalog;
30/// Canonical diagnostic codes, categories, severities, and tags.
31pub mod codes;
32/// Diagnostic payload data structures and related information types.
33pub mod types;
34
35mod api;
36pub use api::*;