Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/tools/ci/src/commands/doc_check.rs
6598 views
1
use crate::{args::Args, Prepare, PreparedCommand};
2
use argh::FromArgs;
3
use xshell::cmd;
4
5
/// Checks that all docs compile.
6
#[derive(FromArgs, Default)]
7
#[argh(subcommand, name = "doc-check")]
8
pub struct DocCheckCommand {}
9
10
impl Prepare for DocCheckCommand {
11
fn prepare<'a>(&self, sh: &'a xshell::Shell, args: Args) -> Vec<PreparedCommand<'a>> {
12
let jobs = args.build_jobs();
13
14
vec![PreparedCommand::new::<Self>(
15
cmd!(
16
sh,
17
"cargo doc --workspace --all-features --no-deps --document-private-items {jobs...} --keep-going"
18
),
19
"Please fix doc warnings in output above.",
20
)
21
.with_env_var("RUSTDOCFLAGS", "-D warnings")]
22
}
23
}
24
25