Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,21 @@ repos:
language: system
files: ^maven-projects/spark/
pass_filenames: false
require_serial: true
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)$
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cargo-fmt hook is configured to run on .toml and .lock changes, but cargo fmt only formats Rust source files. Consider narrowing the files regex to ^rust/.*\.rs$ (or switching to types: [rust]) to avoid unnecessary hook runs on non-Rust files.

Suggested change
files: ^rust/.*\.(rs|toml|lock)$
files: ^rust/.*\.rs$

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this suggestion can accepted. @quan319

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]