From fc56c0c1b5e2868543324551233748122aa49c15 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 25 Oct 2023 13:19:17 +1100 Subject: [PATCH] XXX: debugging --- src/tools/tidy/src/alphabetical.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; }); }