mirror of https://github.com/astral-sh/ruff
Don't assume errors appear in-order with line contents
This commit is contained in:
parent
9e3c35e6dc
commit
80f3cd0ef7
|
|
@ -31,8 +31,9 @@ pub fn check_lines(checks: &mut Vec<Check>, contents: &str, settings: &Settings)
|
|||
}
|
||||
}
|
||||
}
|
||||
ignored.sort();
|
||||
for index in ignored.iter().rev() {
|
||||
checks.remove(*index);
|
||||
checks.swap_remove(*index);
|
||||
}
|
||||
checks.extend(line_checks);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue