2 releases

0.1.1 Nov 6, 2020
0.1.0 Oct 5, 2020

#474 in Value formatting

Download history 14422/week @ 2025-09-19 18453/week @ 2025-09-26 24922/week @ 2025-10-03 24734/week @ 2025-10-10 26246/week @ 2025-10-17 27627/week @ 2025-10-24 31762/week @ 2025-10-31 25200/week @ 2025-11-07 36261/week @ 2025-11-14 26075/week @ 2025-11-21 21993/week @ 2025-11-28 27025/week @ 2025-12-05 18714/week @ 2025-12-12 9940/week @ 2025-12-19 1903/week @ 2025-12-26 23747/week @ 2026-01-02

60,442 downloads per month
Used in password-rules-parser

MIT license

16KB
410 lines

A way to print simple lint messages.

The output is similar to rustc's.


lib.rs:

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:

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);

Dependencies

~0.1–10MB
~50K SLoC