Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,21 @@ jobs:
- name: Build
working-directory: examples/${{ matrix.example-dir }}
run: cargo build

check-docs:
needs: prepare
name: Check documentation errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ needs.prepare.outputs.rust_version }}
override: true
cache: true
- name: Check docs
run: RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Coding Conventions
------------------

This codebase uses spaces, not tabs.
Run `just check` to check formatting, linting, compilation and commit signing, `just fmt` to format code before commiting, and `just test` to run tests for all crates.
Run `just check` to check formatting, linting, compilation and commit signing, `just fmt` to format code before commiting, `just test` to run tests for all crates, `just pre-push` to run the full pre-push suite before pushing changes and `just doc` to check documentation build warnings and errors for all packages.
This is also enforced by the CI.
All public items must be documented. We adhere to the [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/about.html) with respect to documentation.

Expand Down
4 changes: 2 additions & 2 deletions crates/chain/src/indexer/keychain_txout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,13 +1096,13 @@ impl Merge for ChangeSet {

/// Trait to extend [`SyncRequestBuilder`].
pub trait SyncRequestBuilderExt<K> {
/// Add [`Script`](bitcoin::Script)s that are revealed by the `indexer` of the given `spk_range`
/// Add [`Script`]s that are revealed by the `indexer` of the given `spk_range`
/// that will be synced against.
fn revealed_spks_from_indexer<R>(self, indexer: &KeychainTxOutIndex<K>, spk_range: R) -> Self
where
R: core::ops::RangeBounds<K>;

/// Add [`Script`](bitcoin::Script)s that are revealed by the `indexer` but currently unused.
/// Add [`Script`]s that are revealed by the `indexer` but currently unused.
fn unused_spks_from_indexer(self, indexer: &KeychainTxOutIndex<K>) -> Self;
}

Expand Down
3 changes: 1 addition & 2 deletions crates/core/src/spk_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ impl<I, D> SyncRequestBuilder<I, D> {
/// # Example
///
/// Sync revealed script pubkeys obtained from a
/// [`KeychainTxOutIndex`](../../bdk_chain/indexer/keychain_txout/struct.KeychainTxOutIndex.
/// html).
/// [`KeychainTxOutIndex`](https://docs.rs/bdk_chain/latest/bdk_chain/indexer/keychain_txout/struct.KeychainTxOutIndex.html).
///
/// ```rust
/// # use bdk_chain::bitcoin::BlockHash;
Expand Down
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ alias c := check
alias f := fmt
alias t := test
alias p := pre-push
alias d := doc

_default:
@just --list
Expand Down Expand Up @@ -57,3 +58,7 @@ _test-testenv:

# Run pre-push suite: format, check, and test
pre-push: fmt check test
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it's also a good idea to add the doc to pre-push too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the doc for pre-push in this commit.


# Check documentation for all workspace packages
doc:
RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps