[−][src]Crate pretty_lint
A library for pretty-printing lint errors with a given source text.
The API is fairly minimal, and the output closely resembles rustc's.
Example usage:
ⓘThis code runs with edition 2018
let src = "highlight me"; let lint = PrettyLint::success(src) .at(Span::range((1, 1), (1, src.len()))) .with_message("you have been highlighted") .with_inline_message("look at this") .with_file_path(file!()); println!("{}", lint);
Re-exports
pub use colored; |
Structs
Position | Position in a source document 1-based. |
PrettyLint | Show a pretty lint message similar to rustc's messages. |
Span | The range the lint spans. |
Enums
Severity | Lint severity. |