File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ fn check_todo(path: &Path, text: &str) {
3535 }
3636 if text. contains ( "TODO" ) || text. contains ( "TOOD" ) || text. contains ( "todo!" ) {
3737 panic ! (
38- "\n TODO markers should not be committed to the master branch,\n \
38+ "\n TODO markers or todo! macros should not be committed to the master branch,\n \
3939 use FIXME instead\n \
4040 {}\n ",
4141 path. display( ) ,
@@ -47,9 +47,9 @@ fn check_trailing_ws(path: &Path, text: &str) {
4747 if is_exclude_dir ( path, & [ "test_data" ] ) {
4848 return ;
4949 }
50- for line in text. lines ( ) {
50+ for ( line_number , line) in text. lines ( ) . enumerate ( ) {
5151 if line. chars ( ) . last ( ) . map ( char:: is_whitespace) == Some ( true ) {
52- panic ! ( "Trailing whitespace in {}" , path. display( ) )
52+ panic ! ( "Trailing whitespace in {} at line {} " , path. display( ) , line_number )
5353 }
5454 }
5555}
You can’t perform that action at this time.
0 commit comments