mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-15 21:09:07 +00:00
![]() ## Summary
Fixes the remaining range reporting differences between the `ruff_db`
diagnostic rendering and Ruff's existing rendering, as noted in
https://github.com/astral-sh/ruff/pull/19415#issuecomment-3160525595.
This PR is structured as a series of three pairs. The first commit in
each pair adds a test showing the previous behavior, followed by a fix
and the updated snapshot. It's quite a small PR, but that might be
helpful just for the contrast.
You can also look at [this
range](
|
||
---|---|---|
.. | ||
examples | ||
src | ||
tests | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |
This is a fork of the annotate-snippets
crate. The principle motivation for
this fork, at the time of writing, is issue #167. Specifically, we wanted to
upgrade our version of annotate-snippets
, but do so without changing our
diagnostic message format.
This copy of annotate-snippets
is basically identical to upstream, but with
an extra Level::None
variant that permits skipping over a new non-optional
header emitted by annotate-snippets
.
More generally, it seems plausible that we may want to tweak other aspects of the output format in the future, so it might make sense to stick with our own copy so that we can be masters of our own destiny.