From f6a88e61f789c58a9307dd7405faf00d92b5f84b Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 20:51:36 +0800 Subject: chore: update pre-commit configuration for Rust hooks Modified the .pre-commit-config.yaml file to replace the Rust pre-commit repository and update the hooks for formatting and linting. This change enhances the configuration by using the latest version of the Rust pre-commit hooks and streamlining the setup for Rust projects. --- .pre-commit-config.yaml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9a0acb..885534b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,10 @@ ci: autofix_prs: true autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit hooks [skip ci]" - system_language: ["rust"] - + repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-json exclude: ^ui/tsconfig.*\.json$ @@ -19,22 +18,15 @@ repos: - id: check-ast - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.6 + rev: v0.14.13 hooks: - id: ruff args: [ --fix ] - id: ruff-format - - repo: https://github.com/doublify/pre-commit-rust - rev: v1.0 + - repo: https://github.com/FeryET/pre-commit-rust + rev: v1.2.1 hooks: - id: fmt - args: ["--check", "--manifest-path", "src-tauri/Cargo.toml", "--"] - files: ^src-tauri/.*\.rs$ - pass_filenames: false - language: system + - id: cargo-check - id: clippy - args: ["--manifest-path", "src-tauri/Cargo.toml", "--", "-D", "warnings"] - files: ^src-tauri/.*\.rs$ - pass_filenames: false - language: system -- cgit v1.2.3-70-g09d2