Skip to content

Commit 18a0967

Browse files
committed
Enforce doc link correctness during cargo doc runs and in CI
1 parent 98c6566 commit 18a0967

File tree

6 files changed

+13
-0
lines changed

6 files changed

+13
-0
lines changed

background-processor/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![deny(broken_intra_doc_links)]
2+
#![deny(unsafe_code)]
3+
14
#[macro_use] extern crate lightning;
25

36
use lightning::chain;

ci/check-compiles.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ set -e
33
set -x
44
echo Testing $(git log -1 --oneline)
55
cargo check
6+
cargo doc
67
cd fuzz && cargo check --features=stdin_fuzz

lightning-block-sync/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
//! [`SpvClient`]: struct.SpvClient.html
1717
//! [`BlockSource`]: trait.BlockSource.html
1818
19+
#![deny(broken_intra_doc_links)]
20+
#![deny(unsafe_code)]
21+
1922
#[cfg(any(feature = "rest-client", feature = "rpc-client"))]
2023
pub mod http;
2124

lightning-net-tokio/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
//! }
7373
//! ```
7474
75+
#![deny(broken_intra_doc_links)]
76+
#![deny(missing_docs)]
77+
7578
use bitcoin::secp256k1::key::PublicKey;
7679

7780
use tokio::net::TcpStream;

lightning-persister/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(broken_intra_doc_links)]
2+
13
mod util;
24

35
extern crate lightning;

lightning/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
2121
#![cfg_attr(not(any(feature = "fuzztarget", feature = "_test_utils")), deny(missing_docs))]
2222
#![cfg_attr(not(any(test, feature = "fuzztarget", feature = "_test_utils")), forbid(unsafe_code))]
23+
#![deny(broken_intra_doc_links)]
2324

2425
// In general, rust is absolutely horrid at supporting users doing things like,
2526
// for example, compiling Rust code for real environments. Disable useless lints

0 commit comments

Comments
 (0)