From d021d3ef886b5dd7645f04e37e1c6623d42ae0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 23 Apr 2020 15:51:03 +0200 Subject: [PATCH 1/2] clippy_dev: make it fatal when the regex for updating lint count does not match Fixes #5510 --- clippy_dev/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs index 1f8510f43a61..6fdd282c6849 100644 --- a/clippy_dev/src/lib.rs +++ b/clippy_dev/src/lib.rs @@ -291,10 +291,11 @@ where } if !found { - // This happens if the provided regex in `clippy_dev/src/main.rs` is not found in the + // This happens if the provided regex in `clippy_dev/src/main.rs` does not match in the // given text or file. Most likely this is an error on the programmer's side and the Regex // is incorrect. - eprintln!("error: regex `{:?}` not found. You may have to update it.", start); + eprintln!("error: regex \n{:?}\ndoesn't match. You may have to update it.", start); + std::process::exit(1); } let mut new_lines = new_lines.join("\n"); From 081641249e804a718815681ef9678d0ba608d530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 23 Apr 2020 16:08:40 +0200 Subject: [PATCH 2/2] README: fix lit count line It looks like after changing to "there are more than 120 lints", an older PR was merged and resolving merge conflicts this was changed back to "there are 123 lints" causing the update-script to silently fail. Changed back the README.md back to the new format fixes the problem. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d5939db8d5d..222b81023a77 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code. -[There are 362 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html) +[There are over 350 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html) We have a bunch of lint categories to allow you to choose how much Clippy is supposed to ~~annoy~~ help you: