Skip to content

Commit

Permalink
Fix pre push hook (#1869)
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando authored Feb 6, 2025
1 parent 663e8e0 commit 1afcf24
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
5 changes: 1 addition & 4 deletions .cargo-husky/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -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
8 changes: 1 addition & 7 deletions .cargo-husky/hooks/pre-push
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ jobs:
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
working-directory: ${{ env.BUILD_WORKING_DIR }}
run: sudo apt-get update && sudo apt-get -y install libdbus-1-dev
run: cargo build --target-dir="$GITHUB_WORKSPACE/target" --package ${{ matrix.crate.name }} --features opt --release --target ${{ matrix.sys.target }}
run: |
sudo apt-get update && sudo apt-get -y install libdbus-1-dev
cargo build --target-dir="$GITHUB_WORKSPACE/target" --package ${{ matrix.crate.name }} --features opt --release --target ${{ matrix.sys.target }}
- name: Build provenance for attestation (release only)
if: github.event_name == 'release'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -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,
Expand Down

0 comments on commit 1afcf24

Please sign in to comment.