ruff/crates/ruff_server/src
Brent Westbrook 2643dc5b7a
Rename `Diagnostic::syntax_error` methods, separate `Ord` implementation (#19179)
## Summary

This PR addresses some additional feedback on #19053:

- Renaming the `syntax_error` methods to `invalid_syntax` to match the
lint id
- Moving the standalone `diagnostic_from_violation` function to
`Violation::into_diagnostic`
- Removing the `Ord` and `PartialOrd` implementations from `Diagnostic`
in favor of `Diagnostic::start_ordering`

## Test Plan

Existing tests

## Additional Follow-ups

Besides these, I also put the following comments on my todo list, but
they seemed like they might be big enough to have their own PRs:

- [Use `LintId::IOError` for IO
errors](https://github.com/astral-sh/ruff/pull/19053#discussion_r2189425922)
- [Move `Fix` and
`Edit`](https://github.com/astral-sh/ruff/pull/19053#discussion_r2189448647)
- [Avoid so many
unwraps](https://github.com/astral-sh/ruff/pull/19053#discussion_r2189465980)
2025-07-08 09:54:19 -04:00
..
edit Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
server [ty] Add documentation for server traits (#19137) 2025-07-07 14:26:09 +00:00
session Support cancellation requests (#18627) 2025-06-12 22:08:42 +02:00
edit.rs Split `SourceLocation` into `LineColumn` and `SourceLocation` (#17587) 2025-04-27 11:27:33 +01:00
fix.rs Consider virtual path for various server actions (#18910) 2025-06-24 12:24:28 +00:00
format.rs Consider virtual path for various server actions (#18910) 2025-06-24 12:24:28 +00:00
lib.rs Support cancellation requests (#18627) 2025-06-12 22:08:42 +02:00
lint.rs Rename `Diagnostic::syntax_error` methods, separate `Ord` implementation (#19179) 2025-07-08 09:54:19 -04:00
logging.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
resolve.rs Root exclusions in the server to project root (#16043) 2025-02-10 04:57:14 +00:00
server.rs Support cancellation requests (#18627) 2025-06-12 22:08:42 +02:00
session.rs Support cancellation requests (#18627) 2025-06-12 22:08:42 +02:00
workspace.rs Centralize client options validation (#18623) 2025-06-12 18:58:30 +02:00