File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ fn is_close_bracket(c: char) -> bool {
2929 matches ! ( c, ')' | ']' | '}' )
3030}
3131
32- const START_COMMENT : & str = "// tidy-alphabetical-start" ;
32+ // Don't let tidy check this here :D
33+ const START_COMMENT : & str = concat ! ( "// tidy-alphabetical" , "-start" ) ;
3334const END_COMMENT : & str = "// tidy-alphabetical-end" ;
3435
3536fn check_section < ' a > (
@@ -47,7 +48,7 @@ fn check_section<'a>(
4748 if line. contains ( START_COMMENT ) {
4849 tidy_error ! (
4950 bad,
50- "{file}:{} found `// tidy-alphabetical-start ` expecting `// tidy-alphabetical-end `" ,
51+ "{file}:{} found `{START_COMMENT} ` expecting `{END_COMMENT} `" ,
5152 line_idx
5253 )
5354 }
@@ -102,10 +103,7 @@ pub fn check(path: &Path, bad: &mut bool) {
102103 if line. contains ( START_COMMENT ) {
103104 check_section ( file, & mut lines, bad) ;
104105 if lines. peek ( ) . is_none ( ) {
105- tidy_error ! (
106- bad,
107- "{file}: reached end of file expecting `// tidy-alphabetical-end`"
108- )
106+ tidy_error ! ( bad, "{file}: reached end of file expecting `{END_COMMENT}`" )
109107 }
110108 }
111109 }
Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ fn main() {
9090 check ! ( edition, & compiler_path) ;
9191 check ! ( edition, & library_path) ;
9292
93+ check ! ( alphabetical, & src_path) ;
9394 check ! ( alphabetical, & compiler_path) ;
95+ check ! ( alphabetical, & library_path) ;
9496
9597 let collected = {
9698 while handles. len ( ) >= concurrency. get ( ) {
You can’t perform that action at this time.
0 commit comments