diff options
| author | 2026-01-16 10:22:58 +0800 | |
|---|---|---|
| committer | 2026-01-16 10:22:58 +0800 | |
| commit | f1b297cca97b18e179e056233ffba146eab784cf (patch) | |
| tree | 18c38e3420952637c7a2aa41f60f87a6a263fadd /.pre-commit-config.yaml | |
| parent | e64b91e24ed9f3e66949911135862db5690ad1ad (diff) | |
| download | DropOut-f1b297cca97b18e179e056233ffba146eab784cf.tar.gz DropOut-f1b297cca97b18e179e056233ffba146eab784cf.zip | |
chore: add cargo formatting and linting hooks to pre-commit configuration
Enhanced the pre-commit configuration by adding hooks for Rust code formatting with `cargo fmt` and linting with `cargo clippy` for files in the `src-tauri` directory. This improves code quality checks for Rust components in the project.
Diffstat (limited to '.pre-commit-config.yaml')
| -rw-r--r-- | .pre-commit-config.yaml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 12c05df..0929a81 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,6 +20,20 @@ repos: - repo: local hooks: + - id: cargo-fmt + name: cargo fmt + entry: bash -c 'cd src-tauri && cargo fmt --all' + language: system + files: ^src-tauri/.*\.rs$ + pass_filenames: false + + - id: cargo-clippy + name: cargo clippy + entry: bash -c 'cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings' + language: system + files: ^src-tauri/.*\.rs$ + pass_filenames: false + - id: oxlint name: oxlint (svelte/ts/js) entry: pnpm --dir ui run lint:fix |