@@ -14,6 +14,8 @@ import (
1414
1515const minimalPkg = "minimalpkg"
1616
17+ const skipDirsCommand = "testdata_etc/,pkg/golinters/goanalysis/(checker|passes)"
18+
1719func TestAutogeneratedNoIssues (t * testing.T ) {
1820 testshared .NewRunnerBuilder (t ).
1921 WithTargetPath (testdataDir , "autogenerated" ).
@@ -116,7 +118,7 @@ func TestTimeoutInConfig(t *testing.T) {
116118 // Run with disallowed option set only in config
117119 testshared .NewRunnerBuilder (t ).
118120 WithConfig (c .cfg ).
119- WithArgs ("--skip-dirs" , "testdata_etc/,pkg/golinters/goanalysis/(checker|passes)" ).
121+ WithArgs ("--skip-dirs" , skipDirsCommand ).
120122 WithTargetPath (testdataDir , minimalPkg ).
121123 Runner ().
122124 Run ().
@@ -526,7 +528,7 @@ func TestEnableAllFastAndEnableCanCoexist(t *testing.T) {
526528
527529 testshared .NewRunnerBuilder (t ).
528530 WithNoConfig ().
529- WithArgs ("--skip-dirs" , "testdata_etc/,pkg/golinters/goanalysis/(checker|passes)" ).
531+ WithArgs ("--skip-dirs" , skipDirsCommand ).
530532 WithArgs (test .args ... ).
531533 WithTargetPath (testdataDir , minimalPkg ).
532534 Runner ().
@@ -633,7 +635,7 @@ func TestDisallowedOptionsInConfig(t *testing.T) {
633635 // Run with disallowed option set only in config
634636 testshared .NewRunnerBuilder (t ).
635637 WithConfig (c .cfg ).
636- WithArgs ("--skip-dirs" , "testdata_etc/,pkg/golinters/goanalysis/(checker|passes)" ).
638+ WithArgs ("--skip-dirs" , skipDirsCommand ).
637639 WithTargetPath (testdataDir , minimalPkg ).
638640 Runner ().
639641 Run ().
@@ -648,7 +650,7 @@ func TestDisallowedOptionsInConfig(t *testing.T) {
648650 // Run with disallowed option set only in command-line
649651 testshared .NewRunnerBuilder (t ).
650652 WithNoConfig ().
651- WithArgs ("--skip-dirs" , "testdata_etc/,pkg/golinters/goanalysis/(checker|passes)" ).
653+ WithArgs ("--skip-dirs" , skipDirsCommand ).
652654 WithArgs (args ... ).
653655 WithTargetPath (testdataDir , minimalPkg ).
654656 Runner ().
@@ -659,7 +661,7 @@ func TestDisallowedOptionsInConfig(t *testing.T) {
659661
660662 testshared .NewRunnerBuilder (t ).
661663 WithConfig (c .cfg ).
662- WithArgs ("--skip-dirs" , "testdata_etc/,pkg/golinters/goanalysis/(checker|passes)" ).
664+ WithArgs ("--skip-dirs" , skipDirsCommand ).
663665 WithArgs (args ... ).
664666 WithTargetPath (testdataDir , minimalPkg ).
665667 Runner ().
0 commit comments