Skip to content

Commit fc56c0c

Browse files
committed
XXX: debugging
1 parent 8a24531 commit fc56c0c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/tools/tidy/src/alphabetical.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,20 @@ fn check_section<'a>(
101101

102102
pub fn check(path: &Path, bad: &mut bool) {
103103
walk(path, |path, _is_dir| filter_dirs(path), &mut |entry, contents| {
104+
let mut this_bad = false;
104105
let file = &entry.path().display();
105106

106107
let mut lines = contents.lines().enumerate();
107108
while let Some((_, line)) = lines.next() {
108109
if line.contains(START_MARKER) {
109-
check_section(file, &mut lines, bad);
110+
check_section(file, &mut lines, &mut this_bad);
110111
}
111112
}
113+
if this_bad {
114+
eprintln!("<<<BAD: {file}");
115+
eprint!("{contents}");
116+
eprintln!(">>>BAD");
117+
}
118+
*bad = *bad || this_bad;
112119
});
113120
}

0 commit comments

Comments
 (0)