From ba5235427efa74ae0eb4c167c5e75544b3a6c3ce Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 21:03:30 +0800 Subject: chore: update pre-commit configuration for Rust hooks to specify manifest path Modified the .pre-commit-config.yaml file to include the `--manifest-path` argument for Rust hooks (fmt, cargo-check, clippy) and defined file patterns for Rust source files. This change enhances the configuration by ensuring that the hooks operate on the correct project files, improving the development workflow. --- .pre-commit-config.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '.pre-commit-config.yaml') diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 89bdd7e..7e37cac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ ci: autofix_prs: true autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit hooks [skip ci]" skip: [fmt,cargo-check,clippy] - + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 @@ -29,5 +29,11 @@ repos: rev: v1.2.1 hooks: - id: fmt + args: [ --manifest-path src-tauri/Cargo.toml ] + files: ^src-tauri/.*\.rs$ - id: cargo-check + args: [ --manifest-path src-tauri/Cargo.toml ] + files: ^src-tauri/.*\.rs$ - id: clippy + args: [ --manifest-path src-tauri/Cargo.toml ] + files: ^src-tauri/.*\.rs$ -- cgit v1.2.3-70-g09d2