Skip to content

Commit b2fdc5c

Browse files
committed
Merge #195: feat(ci): add justfile
df6675d fix(docs): fix `bitcoin::block::Header` link (Luis Schwab) 4b98565 feat(ci): add justfile (Luis Schwab) Pull request description: This PR adds a `justfile` stolen from `rust-esplora-client`. ACKs for top commit: oleonardolima: tACK df6675d Tree-SHA512: 8d8f43c27631d7dc1c0eac28e01828510118a0600c762e9459b779a6423ceb6b1e3000f5c797d065a2ef6e511e2c47f6ad7bcf0182a515e573fc097e74f9e04b
2 parents 5d7be37 + df6675d commit b2fdc5c

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

justfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
alias b := build
2+
alias c := check
3+
alias f := fmt
4+
alias t := test
5+
alias p := pre-push
6+
7+
_default:
8+
@just --list
9+
10+
# Build the project
11+
build:
12+
cargo build
13+
14+
# Check code: formatting, compilation, linting, doc comments, and commit signature
15+
check:
16+
cargo +nightly fmt --all -- --check
17+
cargo check --all-features --all-targets
18+
cargo clippy --all-features --all-targets -- -D warnings
19+
RUSTDOCFLAGS="-D warnings" cargo doc --all-features --no-deps
20+
@[ "$(git log --pretty='format:%G?' -1 HEAD)" = "N" ] && \
21+
echo "\n⚠️ Unsigned commit: BDK requires that commits be signed." || \
22+
true
23+
24+
# Format all code
25+
fmt:
26+
cargo +nightly fmt
27+
28+
# Run all tests on the workspace with all features
29+
test:
30+
cargo test --all-features -- --test-threads=1
31+
32+
# Run pre-push suite: format, check, and test
33+
pre-push: fmt check test
34+

src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use bitcoin::Txid;
1313
/// otherwise.
1414
///
1515
/// [`transaction_get_merkle`]: crate::ElectrumApi::transaction_get_merkle
16-
/// [`BlockHeader`]: bitcoin::BlockHeader
16+
/// [`BlockHeader`]: bitcoin::block::Header
1717
pub fn validate_merkle_proof(
1818
txid: &Txid,
1919
merkle_root: &TxMerkleNode,

0 commit comments

Comments
 (0)