From 0c016cee78144d06d906fccc7715d607a946ca5c Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Thu, 20 Aug 2020 09:11:05 +0200 Subject: [PATCH] Enabling possibility to add custom arguments to clippy too. --- .pre-commit-hooks.yaml | 43 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 480ddd7..0ffe38d 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,21 +1,22 @@ -- id: fmt - name: fmt - description: Format files with cargo fmt. - entry: cargo fmt - language: system - types: [rust] - args: ['--'] -- id: cargo-check - name: cargo check - description: Check the package for errors. - entry: cargo check - language: system - types: [rust] - pass_filenames: false -- id: clippy - name: clippy - description: Lint rust sources - entry: cargo clippy -- -D warnings - language: system - types: [rust] - pass_filenames: false +- id: fmt + name: fmt + description: Format files with cargo fmt. + entry: cargo fmt + language: system + types: [rust] + args: ["--"] +- id: cargo-check + name: cargo check + description: Check the package for errors. + entry: cargo check + language: system + types: [rust] + pass_filenames: false +- id: clippy + name: clippy + description: Lint rust sources + entry: cargo clippy + language: system + args: ["--", "-D", "warnings"] + types: [rust] + pass_filenames: false