From 11757bd94dcb618f508f1439b846f586e7d6022a Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 16:10:11 +0800 Subject: chore: update pre-commit configuration to specify language for hooks Removed the language specification for the ruff hook and added it for the fmt and clippy hooks, ensuring proper configuration for Rust in the pre-commit setup. --- .pre-commit-config.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 75ea03b..5a5ed67 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,3 @@ -minimum_prek_version: '0.2.28' - - ci: autofix_prs: true autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit hooks [skip ci]" @@ -22,7 +19,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.1.6 - language: python hooks: - id: ruff args: [ --fix ] @@ -30,9 +26,12 @@ repos: - repo: https://github.com/doublify/pre-commit-rust rev: v1.0 - language: rust hooks: - id: fmt args: ["--check", "--manifest-path", "src-tauri/Cargo.toml", "--"] + files: ^src-tauri/.*\.rs$ + pass_filenames: false - id: clippy args: ["--manifest-path", "src-tauri/Cargo.toml", "--", "-D", "warnings"] + files: ^src-tauri/.*\.rs$ + pass_filenames: false -- cgit v1.2.3-70-g09d2