File tree 1 file changed +5
-1
lines changed
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>(
70
70
Ok ( set) => set,
71
71
Err ( e) => return Err ( ErrorKind :: InvalidGlobPattern ( e) ) ,
72
72
} ;
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 {
74
75
return Ok ( FormatReport :: new ( ) ) ;
75
76
}
76
77
77
78
// Parse the crate.
78
79
let source_map = Rc :: new ( SourceMap :: new ( FilePathMapping :: empty ( ) ) ) ;
79
80
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
+ }
80
84
let mut report = FormatReport :: new ( ) ;
81
85
let directory_ownership = input. to_directory_ownership ( ) ;
82
86
let krate = match parse_crate (
You can’t perform that action at this time.
0 commit comments