Check {
paths: Vec<PathBuf>,
},
+ Clippy {
+ paths: Vec<PathBuf>,
+ },
+ Fix {
+ paths: Vec<PathBuf>,
+ },
Doc {
paths: Vec<PathBuf>,
},
Subcommands:
build Compile either the compiler or libraries
check Compile either the compiler or libraries, using cargo check
+ clippy Run clippy
+ fix Run cargo fix
test Build and run some test suites
bench Build and run some benchmarks
doc Build documentation
let subcommand = args.iter().find(|&s| {
(s == "build")
|| (s == "check")
+ || (s == "clippy")
+ || (s == "fix")
|| (s == "test")
|| (s == "bench")
|| (s == "doc")
the compiler.",
);
}
+ "clippy" => {
+ subcommand_help.push_str(
+ "\n
+Arguments:
+ This subcommand accepts a number of paths to directories to the crates
+ and/or artifacts to run clippy against. For example:
+
+ ./x.py clippy src/libcore
+ ./x.py clippy src/libcore src/libproc_macro",
+ );
+ }
+ "fix" => {
+ subcommand_help.push_str(
+ "\n
+Arguments:
+ This subcommand accepts a number of paths to directories to the crates
+ and/or artifacts to run `cargo fix` against. For example:
+
+ ./x.py fix src/libcore
+ ./x.py fix src/libcore src/libproc_macro",
+ );
+ }
"test" => {
subcommand_help.push_str(
"\n
let cmd = match subcommand.as_str() {
"build" => Subcommand::Build { paths },
"check" => Subcommand::Check { paths },
+ "clippy" => Subcommand::Clippy { paths },
+ "fix" => Subcommand::Fix { paths },
"test" => Subcommand::Test {
paths,
bless: matches.opt_present("bless"),