Make tidy-alphabetical-{start,end} work more widely.

Don't restrict it to lines that have `//` in them. This means it can be
used in `Cargo.toml` files, for example.
This commit is contained in:
Nicholas Nethercote 2023-10-06 17:29:21 +11:00
parent cae0791da4
commit a504c0c605

View File

@ -30,8 +30,8 @@ fn is_close_bracket(c: char) -> bool {
}
// Don't let tidy check this here :D
const START_COMMENT: &str = concat!("// tidy-alphabetical", "-start");
const END_COMMENT: &str = "// tidy-alphabetical-end";
const START_COMMENT: &str = concat!("tidy-alphabetical", "-start");
const END_COMMENT: &str = "tidy-alphabetical-end";
fn check_section<'a>(
file: impl Display,