From b9863e1cc4637f2c3eaff16ac274dce1f2e1c890 Mon Sep 17 00:00:00 2001 From: Jan Scheer Date: Sun, 30 May 2021 20:07:57 +0200 Subject: [PATCH 1/2] fix precommit for clippy nightly --- .pre-commit-config.yaml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 66d2a5f5a..177b6b8e3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,16 @@ -# https://pre-commit.com -repos: - - repo: https://github.com/doublify/pre-commit-rust - rev: v1.0 +- repo: local hooks: - - id: cargo-check - - id: clippy - - id: fmt + - id: rust-linting + name: Rust linting + description: Run cargo fmt on files included in the commit. + entry: cargo +nightly fmt -- + pass_filenames: true + types: [file, rust] + language: system + - id: rust-clippy + name: Rust clippy + description: Run cargo clippy on files included in the commit. + entry: cargo +nightly clippy --all-targets --all-features -- + pass_filenames: false + types: [file, rust] + language: system From 4a3703d218131d4319a90fb3a925cdff1f4602e3 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 30 May 2021 23:18:45 +0200 Subject: [PATCH 2/2] fix a warning it was showing: [WARNING] normalizing pre-commit configuration to a top-level map. support for top level list will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 177b6b8e3..e3ad98ee3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +repos: - repo: local hooks: - id: rust-linting