Skip to content

Commit ff0dea9

Browse files
committed
add a todo about duplicate diagnostics
1 parent 4668734 commit ff0dea9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

crates/ruff_linter/src/linter.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ pub fn check_path(
293293
}
294294

295295
if parsed.is_valid() {
296+
// TODO(brent) I think this might cause duplicates when calling `diagnostics_to_messages`
297+
// because that function chains `syntax_errors` with `diagnostics` after we've added some
298+
// `syntax_errors` directly into `diagnostics` here. maybe `Message`s get deduplicated and
299+
// it doesn't matter? this does not appear to be the case, though.
296300
diagnostics.extend(
297301
parsed
298302
.syntax_errors(settings.target_version.into())

0 commit comments

Comments
 (0)