]> git.lizzy.rs Git - rust.git/commitdiff
Auto update lint count in Clippy book
authorflip1995 <philipp.krones@embecosm.com>
Sun, 17 Apr 2022 18:43:43 +0000 (20:43 +0200)
committerPhilipp Krones <hello@philkrones.com>
Mon, 6 Jun 2022 14:17:58 +0000 (16:17 +0200)
clippy_dev/src/update_lints.rs

index 5024e63bfa738edcfe7e6f30de8d28eded58d722..1bbd9a45b619e448daea496eb77f63fa6693756f 100644 (file)
@@ -58,6 +58,16 @@ fn generate_lint_files(
         },
     );
 
+    replace_region_in_file(
+        update_mode,
+        Path::new("book/src/README.md"),
+        "[There are over ",
+        " lints included in this crate!]",
+        |res| {
+            write!(res, "{}", round_to_fifty(usable_lints.len())).unwrap();
+        },
+    );
+
     replace_region_in_file(
         update_mode,
         Path::new("CHANGELOG.md"),