Closed devstein closed 8 months ago
Adding Ruff isn't impossible, but it's going to be a bit difficult. This plugin is compiled to WASM. Since Ruff is written in Rust, we'd need to first compile it to a WASM module and then execute that module using wazero. It's WASM inside WASM.
Since Ruff has configuration options, I think it's probably best to continue to run ruff
after generate, but you can try to do the above if you'd like.
What I do is simply ignore generated code from my formatting and linting rules.
Ruff has become the go-to linter and auto-formatter.
It would be great if the generate code was automatically formatted by ruff. Right now, internally we use a script to
sqlc generate
ruff
on the output directoryHappy to contribute if this makes sense