diff options
| author | Philipp Krones <hello@philkrones.com> | 2023-06-02 11:41:57 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2023-06-02 11:41:57 +0200 |
| commit | e6dc0efc0076690c0dcae05541fec771795ca84c (patch) | |
| tree | 18b4bc307f398c6599d89f70859315a678554b76 /clippy_dev | |
| parent | ec2c6155aacbb92e2dba046e1560d9f28a61f077 (diff) | |
| download | rust-e6dc0efc0076690c0dcae05541fec771795ca84c.tar.gz rust-e6dc0efc0076690c0dcae05541fec771795ca84c.zip | |
Merge commit '30448e8cf98d4754350db0c959644564f317bc0f' into clippyup
Diffstat (limited to 'clippy_dev')
| -rw-r--r-- | clippy_dev/src/main.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clippy_dev/src/main.rs b/clippy_dev/src/main.rs index e2457e5a8a5..c03fbe9d275 100644 --- a/clippy_dev/src/main.rs +++ b/clippy_dev/src/main.rs @@ -5,6 +5,7 @@ use clap::{Arg, ArgAction, ArgMatches, Command}; use clippy_dev::{bless, dogfood, fmt, lint, new_lint, serve, setup, update_lints}; use indoc::indoc; +use std::convert::Infallible; fn main() { let matches = get_clap_config(); @@ -180,7 +181,8 @@ fn get_clap_config() -> ArgMatches { .short('n') .long("name") .help("Name of the new lint in snake case, ex: fn_too_long") - .required(true), + .required(true) + .value_parser(|name: &str| Ok::<_, Infallible>(name.replace('-', "_"))), Arg::new("category") .short('c') .long("category") |
