summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-07-04 20:28:46 +0200
committermo8it <mo8it@proton.me>2024-07-04 20:28:46 +0200
commita3657188b63d20b33f6770552169a473f021228f (patch)
tree3ecc1d6d7ee44f75033648123b77c764951d0093 /src/dev
parentb8fcd112866522ca574fd8a0d28562a9ffd3e10d (diff)
Check for missing TODO comments
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/check.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dev/check.rs b/src/dev/check.rs
index 5074c13..29b2b67 100644
--- a/src/dev/check.rs
+++ b/src/dev/check.rs
@@ -92,6 +92,10 @@ fn check_info_file_exercises(info_file: &InfoFile) -> Result<hashbrown::HashSet<
bail!("The `main` function is missing in the file `{path}`.\nCreate at least an empty `main` function to avoid language server errors");
}
+ if !file_buf.contains("// TODO") {
+ bail!("Didn't find any `// TODO` comment in the file `{path}`.\nYou need to have at least one such comment to guide the user.");
+ }
+
if !exercise_info.test && file_buf.contains("#[test]") {
bail!("The file `{path}` contains tests annotated with `#[test]` but the exercise `{name}` has `test = false` in the `info.toml` file");
}