@@ -316,7 +316,6 @@ Usage:
316
316
317
317
Options:
318
318
--config PATH Which rslint config file to use. Defaults to rslint.json.
319
- --list-files List matched files
320
319
--format FORMAT Output format: default | jsonline
321
320
--fix Automatically fix problems
322
321
--no-color Disable colored output
@@ -330,10 +329,9 @@ func runCMD() int {
330
329
flag .Usage = func () { fmt .Fprint (os .Stderr , usage ) }
331
330
332
331
var (
333
- help bool
334
- config string
335
- listFiles bool
336
- fix bool
332
+ help bool
333
+ config string
334
+ fix bool
337
335
338
336
traceOut string
339
337
cpuprofOut string
@@ -346,7 +344,6 @@ func runCMD() int {
346
344
)
347
345
flag .StringVar (& format , "format" , "default" , "output format" )
348
346
flag .StringVar (& config , "config" , "" , "which rslint config to use" )
349
- flag .BoolVar (& listFiles , "list-files" , false , "list matched files" )
350
347
flag .BoolVar (& fix , "fix" , false , "automatically fix problems" )
351
348
flag .BoolVar (& help , "help" , false , "show help" )
352
349
flag .BoolVar (& help , "h" , false , "show help" )
@@ -438,24 +435,15 @@ func runCMD() int {
438
435
files := []* ast.SourceFile {}
439
436
for _ , program := range programs {
440
437
cwdPath := string (tspath .ToPath ("" , currentDirectory , program .Host ().FS ().UseCaseSensitiveFileNames ()).EnsureTrailingDirectorySeparator ())
441
- var matchedFiles strings.Builder
442
438
for _ , file := range program .SourceFiles () {
443
439
p := string (file .Path ())
444
440
if strings .Contains (p , "/node_modules/" ) {
445
441
continue
446
442
}
447
- if fileName , matched := strings .CutPrefix (p , cwdPath ); matched {
448
- if listFiles {
449
- matchedFiles .WriteString ("Found file: " )
450
- matchedFiles .WriteString (fileName )
451
- matchedFiles .WriteByte ('\n' )
452
- }
443
+ if _ , matched := strings .CutPrefix (p , cwdPath ); matched {
453
444
files = append (files , file )
454
445
}
455
446
}
456
- if listFiles {
457
- os .Stdout .WriteString (matchedFiles .String ())
458
- }
459
447
slices .SortFunc (files , func (a * ast.SourceFile , b * ast.SourceFile ) int {
460
448
return len (b .Text ()) - len (a .Text ())
461
449
})
0 commit comments