Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/tools/ci/src/commands/clippy.rs
6598 views
1
use crate::{args::Args, Prepare, PreparedCommand};
2
use argh::FromArgs;
3
use xshell::cmd;
4
5
/// Check for clippy warnings and errors.
6
#[derive(FromArgs, Default)]
7
#[argh(subcommand, name = "clippy")]
8
pub struct ClippyCommand {}
9
10
impl Prepare for ClippyCommand {
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 clippy --workspace --all-targets --all-features {jobs...} -- -Dwarnings"
18
),
19
"Please fix clippy errors in output above.",
20
)]
21
}
22
}
23
24