ruff/crates/ruff_db/src
Brent Westbrook d6009eb942
Unify Message variants (#18051)
## Summary

This PR unifies the ruff `Message` enum variants for syntax errors and
rule violations into a single `Message` struct consisting of a shared
`db::Diagnostic` and some additional, optional fields used for some rule
violations.

This version of `Message` is nearly a drop-in replacement for
`ruff_diagnostics::Diagnostic`, which is the next step I have in mind
for the refactor.

I think this is also a useful checkpoint because we could possibly add
some of these optional fields to the new `Diagnostic` type. I think
we've previously discussed wanting support for `Fix`es, but the other
fields seem less relevant, so we may just need to preserve the `Message`
wrapper for a bit longer.

## Test plan

Existing tests

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
2025-05-19 13:34:04 -04:00
..
diagnostic Unify Message variants (#18051) 2025-05-19 13:34:04 -04:00
files Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
system Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
vendored Setup tracing and document tracing usage (#12730) 2024-08-08 06:28:40 +00:00
display.rs Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
file_revision.rs [red-knot] Use web-time instead of FileTime::now (#16967) 2025-03-25 13:03:30 +00:00
files.rs [ty] Show related information in diagnostic (#17359) 2025-05-19 18:52:12 +02:00
lib.rs Convert Message::SyntaxError to use Diagnostic internally (#17784) 2025-05-08 12:45:51 -04:00
panic.rs [red-knot] Include salsa backtrace in check and mdtest panic messages (#17732) 2025-04-30 10:26:40 +02:00
parsed.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
source.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
system.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
testing.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
vendored.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00