Closed iafisher closed 1 year ago
Yes good idea.
I've had lots of success with pre-commit
, so if there are hooks for rustfmt
on that, then that could work. It has a nice feature that it'll auto-fix PRs, and can be run locally: https://pre-commit.com/#pre-commitci-example. Here's the config we use in xarray: https://github.com/pydata/xarray/blob/main/.pre-commit-config.yaml
That GHA looks good too — fine to start with that!
Another thing we could run (maybe every day rather than on PRs) is cargo audit
We have a decent set of checks now, including rustfmt, and I just added pre-commit. If anyone is up for making a contribution here, things we could add:
cargo audit
Or any others — I'm always up for automating as much as possible.
https://gist.github.com/PurpleBooth/84b3d7d6669f77d5a53801a258ed269a has some great examples
https://github.com/max-sixty/prql/pull/289 now runs tests on all platforms on merge (or a specific PR label), and splits the tests up such that they complete in 32s
These are all done! Closing
It would be nice to add a GitHub workflow to automatically format Rust code using
rustfmt
to ensure that all PRs use consistent formatting.I found https://github.com/mbrobbel/rustfmt-check - it doesn't appear to be very widely used, but it might get the job done.