From a181fd318b12d0648d126b81ed031d074c8471cf Mon Sep 17 00:00:00 2001 From: Alan Du Date: Mon, 3 Jun 2019 09:43:06 -0400 Subject: Implement cargo lint to run clippy --- crates/tools/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/tools/src/main.rs') diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs index 0c3339685..cf189bf1c 100644 --- a/crates/tools/src/main.rs +++ b/crates/tools/src/main.rs @@ -3,7 +3,7 @@ use core::str; use failure::bail; use tools::{ generate, gen_tests, install_format_hook, run, run_with_output, run_rustfmt, - Overwrite, Result, run_fuzzer, + Overwrite, Result, run_fuzzer, run_clippy, }; use std::{path::{PathBuf}, env}; @@ -16,6 +16,7 @@ fn main() -> Result<()> { .subcommand(SubCommand::with_name("format")) .subcommand(SubCommand::with_name("format-hook")) .subcommand(SubCommand::with_name("fuzz-tests")) + .subcommand(SubCommand::with_name("lint")) .get_matches(); match matches.subcommand_name().expect("Subcommand must be specified") { "install-code" => { @@ -28,6 +29,7 @@ fn main() -> Result<()> { "gen-syntax" => generate(Overwrite)?, "format" => run_rustfmt(Overwrite)?, "format-hook" => install_format_hook()?, + "lint" => run_clippy()?, "fuzz-tests" => run_fuzzer()?, _ => unreachable!(), } -- cgit v1.2.3