Crate rome_diagnostics

Source

Re-exports§

pub use crate::advice::Advices;
pub use crate::advice::CodeFrameAdvice;
pub use crate::advice::CommandAdvice;
pub use crate::advice::DiffAdvice;
pub use crate::advice::LogAdvice;
pub use crate::advice::LogCategory;
pub use crate::advice::Visit;
pub use crate::context::Context;
pub use crate::context::DiagnosticExt;
pub use crate::diagnostic::Diagnostic;
pub use crate::diagnostic::DiagnosticTags;
pub use crate::diagnostic::Severity;
pub use crate::display::set_bottom_frame;
pub use crate::display::Backtrace;
pub use crate::display::MessageAndDescription;
pub use crate::display::PrintDescription;
pub use crate::display::PrintDiagnostic;
pub use crate::error::Error;
pub use crate::error::Result;
pub use crate::location::LineIndex;
pub use crate::location::LineIndexBuf;
pub use crate::location::Location;
pub use crate::location::Resource;
pub use crate::location::SourceCode;
pub use termcolor;

Modules§

adapters
This modules exposes a number of “adapter diagnostics” that wrap error types such as std::error::Error or std::io::Error in newtypes implementing the Diagnostic trait
advice
context
diagnostic
display
error
The error module contains the implementation of Error, a dynamic container struct for any type implementing Diagnostic.
location
panic
prelude
Anonymously re-exports all the traits declared by this module, this is intended to be imported as use rome_diagnostics::prelude::*; to automatically bring all these traits into the ambient context
serde

Macros§

category
The category! macro can be used to statically lookup a category by name from the registry
category_concat
The category_concat! macro is a variant of category! using a slightly different syntax, for use in the declare_group and declare_rule macros in the analyzer

Structs§

Category
Metadata for a diagnostic category
CodeSuggestion
A Suggestion that is provided by Rome’s linter, and can be reported to the user, and can be automatically applied if it has the right Applicability.

Enums§

Applicability
Indicates how a tool should manage this suggestion.
DiagnosticTag

Constants§

MAXIMUM_DISPLAYABLE_DIAGNOSTICS

Functions§

print_diagnostic_to_string
Utility function for testing purpose. The function will print an Error to a string, which is then returned by the function.

Derive Macros§

Diagnostic