]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Enforce doc link correctness during `cargo doc` runs and in CI
authorMatt Corallo <git@bluematt.me>
Wed, 17 Mar 2021 18:05:09 +0000 (14:05 -0400)
committerMatt Corallo <git@bluematt.me>
Thu, 18 Mar 2021 15:28:23 +0000 (11:28 -0400)
background-processor/src/lib.rs
ci/check-compiles.sh
lightning-block-sync/src/lib.rs
lightning-net-tokio/src/lib.rs
lightning-persister/src/lib.rs
lightning/src/lib.rs

index f6c2dbfcae064562bfdb96a41a30c891c0f49a16..23c18623dc59f90189bd47b831acf05b0d21655c 100644 (file)
@@ -1,3 +1,6 @@
+#![deny(broken_intra_doc_links)]
+#![deny(unsafe_code)]
+
 #[macro_use] extern crate lightning;
 
 use lightning::chain;
index 177765fb9255fcd45c5d7b76be5f80a64dc8fd08..45ade5c6a1e1d321f3205f0372d9e548af268bbe 100755 (executable)
@@ -3,4 +3,5 @@ set -e
 set -x
 echo Testing $(git log -1 --oneline)
 cargo check
+cargo doc
 cd fuzz && cargo check --features=stdin_fuzz
index db536fe7d43778ccb062be5813548f2072353a44..96f811d3ee580245672297b306d2b04937fb4a03 100644 (file)
@@ -16,6 +16,9 @@
 //! [`SpvClient`]: struct.SpvClient.html
 //! [`BlockSource`]: trait.BlockSource.html
 
+#![deny(broken_intra_doc_links)]
+#![deny(unsafe_code)]
+
 #[cfg(any(feature = "rest-client", feature = "rpc-client"))]
 pub mod http;
 
index 9dc99e4776da7bf281e0295b2cdb6cc1ff074239..74da58dad3ae3a19e124579ce820e199d1b1d879 100644 (file)
@@ -72,6 +72,9 @@
 //! }
 //! ```
 
+#![deny(broken_intra_doc_links)]
+#![deny(missing_docs)]
+
 use bitcoin::secp256k1::key::PublicKey;
 
 use tokio::net::TcpStream;
index 2226bcba6095373f7ae3dc2f7b3db2f7cf5e034c..1b343ce164f508f7cb0e99adfc3fc5f391751fe0 100644 (file)
@@ -1,3 +1,5 @@
+#![deny(broken_intra_doc_links)]
+
 mod util;
 
 extern crate lightning;
index 567a7e18687abef37c6c1939e892684304d40512..2d764c8b71b1355200ca062087fcb22044b5c24b 100644 (file)
@@ -20,6 +20,7 @@
 
 #![cfg_attr(not(any(feature = "fuzztarget", feature = "_test_utils")), deny(missing_docs))]
 #![cfg_attr(not(any(test, feature = "fuzztarget", feature = "_test_utils")), forbid(unsafe_code))]
+#![deny(broken_intra_doc_links)]
 
 // In general, rust is absolutely horrid at supporting users doing things like,
 // for example, compiling Rust code for real environments. Disable useless lints