From 7d77e4c3393009d3d40b8d2aaa7c7a217bcbdf77 Mon Sep 17 00:00:00 2001 From: quan319 Date: Tue, 17 Feb 2026 16:11:29 -0500 Subject: [PATCH] Added Rust pre-commit hooks --- .pre-commit-config.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5774dd948..71d3bd72c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -87,4 +87,21 @@ repos: language: system files: ^maven-projects/spark/ pass_filenames: false - require_serial: true \ No newline at end of file + require_serial: true + + - id: cargo-fmt + name: Rust cargo fmt + entry: bash -c 'cd rust && cargo fmt --all' + language: system + files: ^rust/.*\.(rs|toml|lock)$ + pass_filenames: false + require_serial: true + + - id: cargo-clippy + name: Rust cargo clippy + entry: bash -c 'cd rust && cargo clippy --all-targets --all-features -- -D warnings' + language: system + files: ^rust/.*\.(rs|toml|lock)$ + pass_filenames: false + require_serial: true + stages: [manual]