@@ -536,86 +536,6 @@ func TestAbsPathFileAnalysis(t *testing.T) {
536
536
ExpectHasIssue ("indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)" )
537
537
}
538
538
539
- func TestDisallowedOptionsInConfig (t * testing.T ) {
540
- cases := []struct {
541
- cfg string
542
- option string
543
- }{
544
- {
545
- cfg : `
546
- ruN:
547
- Args:
548
- - 1
549
- ` ,
550
- },
551
- {
552
- cfg : `
553
- run:
554
- CPUProfilePath: path
555
- ` ,
556
- option : "--cpu-profile-path=path" ,
557
- },
558
- {
559
- cfg : `
560
- run:
561
- MemProfilePath: path
562
- ` ,
563
- option : "--mem-profile-path=path" ,
564
- },
565
- {
566
- cfg : `
567
- run:
568
- TracePath: path
569
- ` ,
570
- option : "--trace-path=path" ,
571
- },
572
- {
573
- cfg : `
574
- run:
575
- Verbose: true
576
- ` ,
577
- option : "-v" ,
578
- },
579
- }
580
-
581
- testshared .InstallGolangciLint (t )
582
-
583
- for _ , c := range cases {
584
- // Run with disallowed option set only in config
585
- testshared .NewRunnerBuilder (t ).
586
- WithConfig (c .cfg ).
587
- WithTargetPath (testdataDir , minimalPkg ).
588
- Runner ().
589
- Run ().
590
- ExpectExitCode (exitcodes .Failure )
591
-
592
- if c .option == "" {
593
- continue
594
- }
595
-
596
- args := []string {c .option , "--fast" }
597
-
598
- // Run with disallowed option set only in command-line
599
- testshared .NewRunnerBuilder (t ).
600
- WithNoConfig ().
601
- WithArgs (args ... ).
602
- WithTargetPath (testdataDir , minimalPkg ).
603
- Runner ().
604
- Run ().
605
- ExpectExitCode (exitcodes .Success )
606
-
607
- // Run with disallowed option set both in command-line and in config
608
-
609
- testshared .NewRunnerBuilder (t ).
610
- WithConfig (c .cfg ).
611
- WithArgs (args ... ).
612
- WithTargetPath (testdataDir , minimalPkg ).
613
- Runner ().
614
- Run ().
615
- ExpectExitCode (exitcodes .Failure )
616
- }
617
- }
618
-
619
539
func TestPathPrefix (t * testing.T ) {
620
540
testCases := []struct {
621
541
desc string
0 commit comments