CI: Check intra-doc links

Credit: https://twitter.com/tomaka17/status/1176017851410526208
This commit is contained in:
Jack Grigg 2019-09-24 10:31:04 +01:00
parent 1d02363752
commit d9a0b9c83f
No known key found for this signature in database
GPG Key ID: 9E8255172BBF9898
9 changed files with 37 additions and 0 deletions

View File

@ -39,3 +39,18 @@ jobs:
run: $HOME/.cargo/bin/cargo test --verbose --release --all
- name: Run slow tests
run: $HOME/.cargo/bin/cargo test --verbose --release --all -- --ignored
doc-links:
name: Check intra-doc links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
with:
command: doc
args: --document-private-items

View File

@ -1,3 +1,6 @@
// Catch documentation errors caused by code changes.
#![deny(intra_doc_link_resolution_failure)]
#[cfg(feature = "multicore")]
extern crate crossbeam;

View File

@ -1,3 +1,5 @@
// Catch documentation errors caused by code changes.
#![deny(intra_doc_link_resolution_failure)]
#![allow(unused_imports)]
#[cfg(feature = "derive")]

View File

@ -1,3 +1,6 @@
// Catch documentation errors caused by code changes.
#![deny(intra_doc_link_resolution_failure)]
use ff::{PrimeField, PrimeFieldDecodingError, ScalarEngine, SqrtField};
use rand::RngCore;
use std::error::Error;

View File

@ -1,3 +1,6 @@
// Catch documentation errors caused by code changes.
#![deny(intra_doc_link_resolution_failure)]
use lazy_static;
use ff::{PrimeField, PrimeFieldRepr};

View File

@ -8,6 +8,8 @@
#![cfg_attr(feature = "cargo-clippy", allow(clippy::many_single_char_names))]
#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))]
#![cfg_attr(feature = "cargo-clippy", allow(clippy::write_literal))]
// Catch documentation errors caused by code changes.
#![deny(intra_doc_link_resolution_failure)]
// Force public structures to implement Debug
#![deny(missing_debug_implementations)]

View File

@ -3,6 +3,9 @@
//! `zcash_client_backend` contains Rust structs and traits for creating shielded Zcash
//! light clients.
// Catch documentation errors caused by code changes.
#![deny(intra_doc_link_resolution_failure)]
pub mod constants;
pub mod encoding;
pub mod keys;

View File

@ -1,3 +1,6 @@
// Catch documentation errors caused by code changes.
#![deny(intra_doc_link_resolution_failure)]
#[macro_use]
extern crate lazy_static;

View File

@ -1,3 +1,6 @@
// Catch documentation errors caused by code changes.
#![deny(intra_doc_link_resolution_failure)]
use bellman::groth16::{prepare_verifying_key, Parameters, PreparedVerifyingKey, VerifyingKey};
use pairing::bls12_381::Bls12;
use std::fs::File;