diff --git a/src/tools/tidy/src/alphabetical.rs b/src/tools/tidy/src/alphabetical.rs index 98a8f4a998019..2cdf02d5ad9b0 100644 --- a/src/tools/tidy/src/alphabetical.rs +++ b/src/tools/tidy/src/alphabetical.rs @@ -101,13 +101,20 @@ fn check_section<'a>( pub fn check(path: &Path, bad: &mut bool) { walk(path, |path, _is_dir| filter_dirs(path), &mut |entry, contents| { + let mut this_bad = false; let file = &entry.path().display(); let mut lines = contents.lines().enumerate(); while let Some((_, line)) = lines.next() { if line.contains(START_MARKER) { - check_section(file, &mut lines, bad); + check_section(file, &mut lines, &mut this_bad); } } + if this_bad { + eprintln!("<<>>BAD"); + } + *bad = *bad || this_bad; }); }