kaleidawave / ezno

A JavaScript compiler and TypeScript checker written in Rust with a focus on static analysis and runtime performance
https://kaleidawave.github.io/posts/introducing-ezno/
MIT License
2.3k stars 42 forks source link

Add fuzzers for the checker crate #153

Open jasikpark opened 1 month ago

jasikpark commented 1 month ago

We should add a basic "does it panic" fuzz test for the checker crate.

ruff_formatter_validity

This fuzz harness checks that Ruff's formatter does not introduce new linter errors/warnings by linting once, counting the number of each error type, then formatting, then linting again and ensuring that the number of each error type does not increase across formats. This has the beneficial side effect of discovering cases where the linter does not discover a lint error when it should have due to a formatting inconsistency.

^ We can combine the parser read and print tests with a "do we have consistent errors" test to replicate this style of fuzz test from ruff.