From b82c52b4d720d4ea5148ad9b6f9838839d5aa592 Mon Sep 17 00:00:00 2001 From: Nando Vieira Date: Wed, 5 Feb 2025 15:12:19 -0800 Subject: [PATCH] Disable rule at module level. --- .cargo-husky/hooks/pre-commit | 5 +---- .cargo-husky/hooks/pre-push | 8 +------- .../tests/fixtures/test-wasms/swap/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.cargo-husky/hooks/pre-commit b/.cargo-husky/hooks/pre-commit index d08d9f9ff..c08e59926 100755 --- a/.cargo-husky/hooks/pre-commit +++ b/.cargo-husky/hooks/pre-commit @@ -1,9 +1,6 @@ #!/bin/sh -set -e +set -ex -echo '+cargo fmt --check' cargo fmt --check || (cargo fmt && exit 1) - -echo '+cargo run --bin doc-gen --features clap-markdown' cargo run --bin doc-gen --features clap-markdown diff --git a/.cargo-husky/hooks/pre-push b/.cargo-husky/hooks/pre-push index 9181ab3be..9fab0f97a 100755 --- a/.cargo-husky/hooks/pre-push +++ b/.cargo-husky/hooks/pre-push @@ -1,20 +1,14 @@ #!/bin/sh -set -e +set -ex -echo '+cargo fmt --check' cargo fmt --check || (cargo fmt && exit 1) -echo "unstaged changes" -echo 'git diff-index --quiet HEAD --' git diff-index --quiet HEAD -- -echo '+cargo clippy -- -Dwarnings -Dclippy::all -Dclippy::pedantic' cargo clippy --all -- -Dwarnings -echo '+cargo test --all' cargo build cargo test --all || (echo "might need to rebuild make build-snapshot" && exit 1) -echo '+cargo run --bin doc-gen --features clap-markdown' cargo run --bin doc-gen --features clap-markdown diff --git a/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/lib.rs b/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/lib.rs index 6b899e5df..c73ca898b 100644 --- a/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/lib.rs +++ b/cmd/crates/soroban-test/tests/fixtures/test-wasms/swap/src/lib.rs @@ -3,6 +3,7 @@ //! off-chain. //! This example demonstrates how multi-party authorization can be implemented. #![no_std] +#![allow(clippy::too_many_arguments)] use soroban_sdk::{contract, contractimpl, token, Address, Env, IntoVal}; @@ -14,7 +15,6 @@ impl AtomicSwapContract { // Swap token A for token B atomically. Settle for the minimum requested price // for each party (this is an arbitrary choice; both parties could have // received the full amount as well). - #[allow(clippy::too_many_arguments)] pub fn swap( env: Env, a: Address,