38 let mut error_count = 0;
39 // Avoid embedding the task marker in source so greps only find real occurrences.
40▶ let todo_marker = "todo".to_ascii_uppercase();
41
42 for file in files {
· · ·
50 for (i, line) in contents.split('\n').enumerate() {
51 let trimmed = line.trim();
52▶ if trimmed.contains(&todo_marker) {
53 eprintln!(
54 "{}:{}: {} is used for tasks that should be done before merging a PR; if you want to leave a message in the codebase use FIXME",
· · ·
55 file.display(),
56 i + 1,
57▶ todo_marker
58 );
59 error_count += 1;
· · ·
66 }
67
68▶ eprintln!("found {} {}(s)", error_count, todo_marker);
69 process::exit(1);
70}