File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -221,10 +221,8 @@ fn collect_fmt_files(
221
221
files : FilePatterns ,
222
222
) -> Result < Vec < PathBuf > , AnyError > {
223
223
FileCollector :: new ( |e| {
224
- cli_options. ext_flag ( ) . as_ref ( ) . is_some_and ( |ext| {
225
- is_supported_ext_fmt ( Path :: new ( & format ! ( "placeholder.{ext}" ) ) )
226
- } ) || is_supported_ext_fmt ( e. path )
227
- || e. path . extension ( ) . is_none ( )
224
+ is_supported_ext_fmt ( e. path )
225
+ || ( e. path . extension ( ) . is_none ( ) && cli_options. ext_flag ( ) . is_some ( ) )
228
226
} )
229
227
. ignore_git_folder ( )
230
228
. ignore_node_modules ( )
Original file line number Diff line number Diff line change @@ -430,10 +430,8 @@ fn collect_lint_files(
430
430
files : FilePatterns ,
431
431
) -> Result < Vec < PathBuf > , AnyError > {
432
432
FileCollector :: new ( |e| {
433
- cli_options. ext_flag ( ) . as_ref ( ) . is_some_and ( |ext| {
434
- is_script_ext ( Path :: new ( & format ! ( "placeholder.{ext}" ) ) )
435
- } ) || is_script_ext ( e. path )
436
- || e. path . extension ( ) . is_none ( )
433
+ is_script_ext ( e. path )
434
+ || ( e. path . extension ( ) . is_none ( ) && cli_options. ext_flag ( ) . is_some ( ) )
437
435
} )
438
436
. ignore_git_folder ( )
439
437
. ignore_node_modules ( )
Original file line number Diff line number Diff line change 12
12
},
13
13
"extensionless" : {
14
14
"args" : " fmt extensionless" ,
15
+ "output" : " error: No target files found.\n " ,
16
+ "exitCode" : 1
17
+ },
18
+ "extensionless_with_flag" : {
19
+ "args" : " fmt --ext=ts extensionless" ,
15
20
"output" : " Checked 1 file\n "
16
21
}
17
22
}
Original file line number Diff line number Diff line change 12
12
},
13
13
"extensionless" : {
14
14
"args" : " lint extensionless" ,
15
+ "output" : " error: No target files found.\n " ,
16
+ "exitCode" : 1
17
+ },
18
+ "extensionless_with_flag" : {
19
+ "args" : " lint --ext=ts extensionless" ,
15
20
"output" : " Checked 1 file\n "
16
21
}
17
22
}
You can’t perform that action at this time.
0 commit comments