diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de80e38bb..924f640d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,10 +19,10 @@ jobs: target: wasm32-unknown-unknown - name: Run clippy for native - run: cargo clippy --all --all-targets -- -D warnings -D missing-docs + run: cargo clippy --all --all-targets -- -D warnings - name: Run clippy for wasm32 - run: cargo clippy --all --all-targets --target=wasm32-unknown-unknown -- -D warnings -D missing-docs + run: cargo clippy --all --all-targets --target=wasm32-unknown-unknown -- -D warnings docs: @@ -33,11 +33,23 @@ jobs: - name: Install toolchain uses: dtolnay/rust-toolchain@nightly + - name: Install wasm Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - name: Run rustdoc check env: RUSTDOCFLAGS: --cfg docsrs -D warnings run: cargo +nightly doc --no-deps + - name: Missing docs for native + run: cargo check --all -- -D missing-docs + + - name: Missing docs for wasm32 + run: cargo check --all --target=wasm32-unknown-unknown -- -D missing-docs + fmt: runs-on: ubuntu-latest diff --git a/grpc/tests/tonic.rs b/grpc/tests/tonic.rs index 20abd71f3..07d1387af 100644 --- a/grpc/tests/tonic.rs +++ b/grpc/tests/tonic.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(not(target_arch = "wasm32"))] use celestia_grpc::types::auth::Account; diff --git a/node/src/store/indexed_db_store.rs b/node/src/store/indexed_db_store.rs index 3d9fcca5b..58832f926 100644 --- a/node/src/store/indexed_db_store.rs +++ b/node/src/store/indexed_db_store.rs @@ -307,7 +307,7 @@ impl IndexedDbStore { } trait TransactionOperationFn<'a, Arg>: - FnOnce(&'a Transaction, Arg) -> >::Fut + FnOnce(&'a Transaction, Arg) -> >::Fut { type Fut: Future>::Output>; type Output; diff --git a/node/tests/graceful_stop.rs b/node/tests/graceful_stop.rs index e241fe0c5..953851b0c 100644 --- a/node/tests/graceful_stop.rs +++ b/node/tests/graceful_stop.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(not(target_arch = "wasm32"))] use std::path::Path; diff --git a/node/tests/header_ex.rs b/node/tests/header_ex.rs index da0c0b158..57b199452 100644 --- a/node/tests/header_ex.rs +++ b/node/tests/header_ex.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(not(target_arch = "wasm32"))] use std::time::Duration; diff --git a/node/tests/node.rs b/node/tests/node.rs index 3d36bd446..ac7101216 100644 --- a/node/tests/node.rs +++ b/node/tests/node.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(not(target_arch = "wasm32"))] use std::time::Duration; diff --git a/node/tests/shwap.rs b/node/tests/shwap.rs index 1715ad59d..343fb47a5 100644 --- a/node/tests/shwap.rs +++ b/node/tests/shwap.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(not(target_arch = "wasm32"))] use std::{collections::HashSet, time::Duration}; diff --git a/rpc/tests/blob.rs b/rpc/tests/blob.rs index 50ce067fb..575772700 100644 --- a/rpc/tests/blob.rs +++ b/rpc/tests/blob.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(not(target_arch = "wasm32"))] use std::cmp::Ordering; diff --git a/rpc/tests/header.rs b/rpc/tests/header.rs index 357d7752f..304e82287 100644 --- a/rpc/tests/header.rs +++ b/rpc/tests/header.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(not(target_arch = "wasm32"))] use celestia_rpc::prelude::*; diff --git a/rpc/tests/p2p.rs b/rpc/tests/p2p.rs index a151b025f..164ecf340 100644 --- a/rpc/tests/p2p.rs +++ b/rpc/tests/p2p.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(all(not(target_arch = "wasm32"), feature = "p2p"))] use crate::utils::client::{new_test_client, AuthLevel}; use celestia_rpc::prelude::*; diff --git a/rpc/tests/share.rs b/rpc/tests/share.rs index add6f6a01..16f7cad3e 100644 --- a/rpc/tests/share.rs +++ b/rpc/tests/share.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(not(target_arch = "wasm32"))] use celestia_rpc::prelude::*; diff --git a/rpc/tests/state.rs b/rpc/tests/state.rs index 9ac52a28a..9e535914b 100644 --- a/rpc/tests/state.rs +++ b/rpc/tests/state.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(not(target_arch = "wasm32"))] use crate::utils::{random_bytes, random_ns}; diff --git a/rpc/tests/wasm.rs b/rpc/tests/wasm.rs index 933b69032..7a02026e3 100644 --- a/rpc/tests/wasm.rs +++ b/rpc/tests/wasm.rs @@ -1,4 +1,3 @@ -#![allow(missing_docs)] #![cfg(all(target_arch = "wasm32", feature = "wasm-bindgen"))] use celestia_rpc::client::Client;