aboutsummaryrefslogtreecommitdiff
path: root/xtask/tests/tidy-tests/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/tests/tidy-tests/cli.rs')
-rw-r--r--xtask/tests/tidy-tests/cli.rs25
1 files changed, 1 insertions, 24 deletions
diff --git a/xtask/tests/tidy-tests/cli.rs b/xtask/tests/tidy-tests/cli.rs
index f9ca45292..f5b00a8b8 100644
--- a/xtask/tests/tidy-tests/cli.rs
+++ b/xtask/tests/tidy-tests/cli.rs
@@ -1,7 +1,6 @@
1use walkdir::WalkDir;
2use xtask::{ 1use xtask::{
3 codegen::{self, Mode}, 2 codegen::{self, Mode},
4 project_root, run_rustfmt, 3 run_rustfmt,
5}; 4};
6 5
7#[test] 6#[test]
@@ -31,25 +30,3 @@ fn check_code_formatting() {
31 panic!("{}. Please format the code by running `cargo format`", error); 30 panic!("{}. Please format the code by running `cargo format`", error);
32 } 31 }
33} 32}
34
35#[test]
36fn no_todo() {
37 WalkDir::new(project_root().join("crates")).into_iter().for_each(|e| {
38 let e = e.unwrap();
39 if e.path().extension().map(|it| it != "rs").unwrap_or(true) {
40 return;
41 }
42 if e.path().ends_with("tests/cli.rs") {
43 return;
44 }
45 let text = std::fs::read_to_string(e.path()).unwrap();
46 if text.contains("TODO") || text.contains("TOOD") || text.contains("todo!") {
47 panic!(
48 "\nTODO markers should not be committed to the master branch,\n\
49 use FIXME instead\n\
50 {}\n",
51 e.path().display(),
52 )
53 }
54 })
55}