File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -70,13 +70,17 @@ fn format_project<T: FormatHandler>(
7070 Ok ( set) => set,
7171 Err ( e) => return Err ( ErrorKind :: InvalidGlobPattern ( e) ) ,
7272 } ;
73- if config. skip_children ( ) && ignore_path_set. is_match ( & main_file) {
73+ let is_ignore_match = ignore_path_set. is_match ( & main_file) ;
74+ if config. skip_children ( ) && is_ignore_match {
7475 return Ok ( FormatReport :: new ( ) ) ;
7576 }
7677
7778 // Parse the crate.
7879 let source_map = Rc :: new ( SourceMap :: new ( FilePathMapping :: empty ( ) ) ) ;
7980 let mut parse_session = make_parse_sess ( source_map. clone ( ) , config) ;
81+ // if is_ignore_match {
82+ // parse_session.span_diagnostic = Handler::with_emitter(true, None, silent_emitter());
83+ // }
8084 let mut report = FormatReport :: new ( ) ;
8185 let directory_ownership = input. to_directory_ownership ( ) ;
8286 let krate = match parse_crate (
You can’t perform that action at this time.
0 commit comments