diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-04-23 15:51:03 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-04-23 16:11:11 +0200 |
| commit | d021d3ef886b5dd7645f04e37e1c6623d42ae0b6 (patch) | |
| tree | 6e2af750be6607700f6f5e2e600b696594a3cb16 | |
| parent | d01a49810b97543cb783970ba0d3e27ccafb8fa8 (diff) | |
| download | rust-d021d3ef886b5dd7645f04e37e1c6623d42ae0b6.tar.gz rust-d021d3ef886b5dd7645f04e37e1c6623d42ae0b6.zip | |
clippy_dev: make it fatal when the regex for updating lint count does not match
Fixes #5510
| -rw-r--r-- | clippy_dev/src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs index 1f8510f43a6..6fdd282c684 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"); |
