diff --git a/apps/oxlint/src/output_formatter/default.rs b/apps/oxlint/src/output_formatter/default.rs index e3fbc62ed2e62..79cae15a6b553 100644 --- a/apps/oxlint/src/output_formatter/default.rs +++ b/apps/oxlint/src/output_formatter/default.rs @@ -134,15 +134,7 @@ mod test_implementation { self.diagnostics.sort_by_cached_key(|diagnostic| { let info = Info::new(diagnostic); - ( - info.filename, - info.start.line, - info.start.column, - info.end.line, - info.end.column, - info.rule_id, - info.message, - ) + (info.filename, info.start, info.end, info.rule_id, info.message) }); for diagnostic in &self.diagnostics { diff --git a/crates/oxc_diagnostics/src/reporter.rs b/crates/oxc_diagnostics/src/reporter.rs index 9759f9eb0fee1..8d45503a7255e 100644 --- a/crates/oxc_diagnostics/src/reporter.rs +++ b/crates/oxc_diagnostics/src/reporter.rs @@ -101,7 +101,7 @@ pub struct Info { pub rule_id: Option, } -#[derive(Debug)] +#[derive(PartialEq, Eq, PartialOrd, Ord, Debug)] pub struct InfoPosition { pub line: usize, pub column: usize,