about summary refs log tree commit diff
path: root/clippy_dev/src
diff options
context:
space:
mode:
authorxFrednet <xFrednet@gmail.com>2021-06-16 00:21:13 +0200
committerflip1995 <philipp.krones@embecosm.com>2021-06-25 11:17:00 +0200
commit3d0984975e555e122499e58d3fbc20e99b7be589 (patch)
tree5cbcc406b96cff6bbdb5bf68e0937e295c61ecac /clippy_dev/src
parent41bc0f4d4d3cdacc97de6c803ff7bdf1c120f315 (diff)
downloadrust-3d0984975e555e122499e58d3fbc20e99b7be589.tar.gz
rust-3d0984975e555e122499e58d3fbc20e99b7be589.zip
Print cargo dev help on missing arg and updated setup documentation
Diffstat (limited to 'clippy_dev/src')
-rw-r--r--clippy_dev/src/fmt.rs2
-rw-r--r--clippy_dev/src/main.rs4
-rw-r--r--clippy_dev/src/setup/intellij.rs2
3 files changed, 5 insertions, 3 deletions
diff --git a/clippy_dev/src/fmt.rs b/clippy_dev/src/fmt.rs
index edc8e6a629c..c81eb40d52f 100644
--- a/clippy_dev/src/fmt.rs
+++ b/clippy_dev/src/fmt.rs
@@ -86,7 +86,7 @@ pub fn run(check: bool, verbose: bool) {
             },
             CliError::RaSetupActive => {
                 eprintln!(
-                    "error: a local rustc repo is enabled as path dependency via `cargo dev ide_setup`.
+                    "error: a local rustc repo is enabled as path dependency via `cargo dev setup intellij`.
 Not formatting because that would format the local repo as well!
 Please revert the changes to Cargo.tomls first."
                 );
diff --git a/clippy_dev/src/main.rs b/clippy_dev/src/main.rs
index b20c40bc556..faf8700f55a 100644
--- a/clippy_dev/src/main.rs
+++ b/clippy_dev/src/main.rs
@@ -2,7 +2,7 @@
 // warn on lints, that are included in `rust-lang/rust`s bootstrap
 #![warn(rust_2018_idioms, unused_lifetimes)]
 
-use clap::{App, Arg, ArgMatches, SubCommand};
+use clap::{App, AppSettings, Arg, ArgMatches, SubCommand};
 use clippy_dev::{bless, fmt, new_lint, serve, setup, stderr_length_check, update_lints};
 fn main() {
     let matches = get_clap_config();
@@ -52,6 +52,7 @@ fn main() {
 
 fn get_clap_config<'a>() -> ArgMatches<'a> {
     App::new("Clippy developer tooling")
+        .setting(AppSettings::ArgRequiredElseHelp)
         .subcommand(
             SubCommand::with_name("bless")
                 .about("bless the test output changes")
@@ -146,6 +147,7 @@ fn get_clap_config<'a>() -> ArgMatches<'a> {
         .subcommand(
             SubCommand::with_name("setup")
                 .about("Support for setting up your personal development environment")
+                .setting(AppSettings::ArgRequiredElseHelp)
                 .subcommand(
                     SubCommand::with_name("intellij")
                         .about("Alter dependencies so Intellij Rust can find rustc internals")
diff --git a/clippy_dev/src/setup/intellij.rs b/clippy_dev/src/setup/intellij.rs
index defb1133e44..9b084f52466 100644
--- a/clippy_dev/src/setup/intellij.rs
+++ b/clippy_dev/src/setup/intellij.rs
@@ -55,7 +55,7 @@ fn inject_deps_into_manifest(
     // do not inject deps if we have aleady done so
     if cargo_toml.contains("[target.'cfg(NOT_A_PLATFORM)'.dependencies]") {
         eprintln!(
-            "cargo dev ide_setup: warning: deps already found inside {}, doing nothing.",
+            "cargo dev setup intellij: warning: deps already found inside {}, doing nothing.",
             manifest_path
         );
         return Ok(());