Skip to content

Commit

Permalink
ignore version-related syntax errors when fuzzing
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed Feb 19, 2025
1 parent a3f8ea9 commit 3f43c82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/ruff_linter/src/linter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,10 @@ fn diagnostics_to_messages(
builder.finish()
});

// ignore version-related syntax errors when fuzzing
#[cfg(fuzzing)]
let syntax_errors = &syntax_errors[..0];

parse_errors
.iter()
.map(|parse_error| Message::from_parse_error(parse_error, locator, file.deref().clone()))
Expand Down

0 comments on commit 3f43c82

Please sign in to comment.