diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ef9f377..4d8d0720 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,5 +32,14 @@ repos: hooks: - id: isort name: isort (python) + - repo: local + hooks: + - id: cargo-fmt + name: format rust code + language: system + # keep in sync with Cargo.toml. There is no way to run cargo fmt for specific files + # https://github.com/rust-lang/rustfmt/issues/4485 + entry: rustfmt --edition 2021 + files: ^rust-arroyo/.*\.rs$ default_language_version: python: python3.8