From 0395df596715538a1ecf57748317caa6c376c11a Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 24 Feb 2024 16:25:52 +0100 Subject: [PATCH] feat(rust): add cargo hooks Signed-off-by: Matej Focko --- .pre-commit-hooks.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 3c711ef..023fa8a 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -25,3 +25,32 @@ language: system types: - rust + +# Cargo +- id: cargo-fmt + name: cargo fmt + description: Format sources with ‹cargo fmt›. + entry: cargo fmt + args: + - "--" + language: system + types: + - rust +- id: cargo-check + name: cargo check + description: Check the crate for errors. + entry: cargo check + language: system + types: + - rust + pass_filenames: false +- id: cargo-clippy + name: cargo clippy + description: Lint the crate with ‹cargo clippy›. + entry: cargo clippy + args: + - "--" + language: system + types: + - rust + pass_filenames: false