use crate::{args::Args, Prepare, PreparedCommand}; use argh::FromArgs; use xshell::cmd; /// Checks that the examples compile. #[derive(FromArgs, Default)] #[argh(subcommand, name = "example-check")] pub struct ExampleCheckCommand {} impl Prepare for ExampleCheckCommand { fn prepare<'a>(&self, sh: &'a xshell::Shell, args: Args) -> Vec> { let jobs = args.build_jobs(); vec![PreparedCommand::new::( cmd!(sh, "cargo check --workspace --examples {jobs...}"), "Please fix compiler errors for examples in output above.", )] } }