Skip to content

Commit a365718

Browse files
committed
Check for missing TODO comments
1 parent b8fcd11 commit a365718

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/dev/check.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ fn check_info_file_exercises(info_file: &InfoFile) -> Result<hashbrown::HashSet<
9292
bail!("The `main` function is missing in the file `{path}`.\nCreate at least an empty `main` function to avoid language server errors");
9393
}
9494

95+
if !file_buf.contains("// TODO") {
96+
bail!("Didn't find any `// TODO` comment in the file `{path}`.\nYou need to have at least one such comment to guide the user.");
97+
}
98+
9599
if !exercise_info.test && file_buf.contains("#[test]") {
96100
bail!("The file `{path}` contains tests annotated with `#[test]` but the exercise `{name}` has `test = false` in the `info.toml` file");
97101
}

0 commit comments

Comments
 (0)