mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00: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:
parent
9db622afe1
commit
70e6c212d9
6 changed files with 57 additions and 1976 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue