mirror of
https://github.com/astral-sh/ruff
synced 2026-01-11 00:24:13 -05:00
Improve ruff_parse_simple to find UTF-8 violations (#5008)
Improves the `ruff_parse_simple` fuzz harness by adding checks for parsed locations to ensure they all lie on UTF-8 character boundaries. This will allow for faster identification of issues like #5004. This also adds additional details for Apple M1 users and clarifies the importance of using `init-fuzzer.sh` (thanks for the feedback, @jasikpark 🙂).
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
pub use crate::node::AstNode;
|
||||
pub use rustpython_ast::*;
|
||||
pub use rustpython_parser::*;
|
||||
|
||||
@@ -183,7 +183,7 @@ impl<'a> Generator<'a> {
|
||||
self.buffer
|
||||
}
|
||||
|
||||
pub(crate) fn unparse_suite<U>(&mut self, suite: &Suite<U>) {
|
||||
pub fn unparse_suite<U>(&mut self, suite: &Suite<U>) {
|
||||
for stmt in suite {
|
||||
self.unparse_stmt(stmt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user