From 6b374dc0221308086fb8eeec3fab7b84b1790ba9 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Wed, 24 Jul 2024 14:30:12 +0200 Subject: [PATCH] Fix possible file corruptions via fmt hook rustfmt should not be called on multiple files, since it can update included files as well, which will lead to writing different files without a lock, and inevitably will corrupt them. --- .pre-commit-hooks.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 0ffe38d..916af54 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -5,6 +5,7 @@ language: system types: [rust] args: ["--"] + pass_filenames: false - id: cargo-check name: cargo check description: Check the package for errors.