gram-diagnostics 0.3.10

Shared LSP-compatible diagnostic types for gram-data and cypher-data
Documentation
  • Coverage
  • 0%
    0 out of 25 items documented0 out of 6 items with examples
  • Size
  • Source code size: 5.65 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 625.94 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • gram-data/tree-sitter-gram
    6 3 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • akollegger

gram-diagnostics

Shared LSP-compatible diagnostic types used by gram-data and cypher-data.

Why it exists

Both gram-data and cypher-data produce diagnostics from linting .gram and .cypher files. Tools like relate that delegate to multiple linters need a single Diagnostic type regardless of which engine ran. Depending on this crate avoids a conversion layer.

Types

Type Description
Severity Error, Warning, Information, Hint
Position line: u32, character: u32 (0-based, UTF-16 columns — LSP wire format)
Range start: Position, end: Position
Diagnostic severity, rule, message, range, optional code
FileResult path + Vec<Diagnostic>
LintResult Top-level JSON envelope (schema_version, tool, files)

All types implement Debug, Clone, Serialize, Deserialize.

Usage

[dependencies]
gram-diagnostics = "0.3"
use gram_diagnostics::{Diagnostic, Severity, Position, Range};

This crate contains only types and derives — no parsing logic.