Skip to content

Commit 5ec43d0

Browse files
committed
review
1 parent 064f43f commit 5ec43d0

15 files changed

+11
-50
lines changed

pkg/commands/internal/migrate/cloner/cloner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import (
1616
"golang.org/x/tools/imports"
1717
)
1818

19-
const newPkgName = "two"
19+
const newPkgName = "versiontwo"
2020

2121
const (
2222
srcDir = "./pkg/config"
23-
dstDir = "./pkg/commands/internal/migrate/two"
23+
dstDir = "./pkg/commands/internal/migrate/versiontwo"
2424
)
2525

2626
func main() {

pkg/commands/internal/migrate/migrate_linter_names.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,6 @@ func allLinters() []LinterInfo {
623623
Presets: []string{"style"},
624624
Slow: true,
625625
},
626-
{
627-
Name: "tenv",
628-
Presets: []string{"test"},
629-
Slow: true,
630-
},
631626
{
632627
Name: "testableexamples",
633628
Presets: []string{"test"},

pkg/commands/internal/migrate/migrate_linter_names_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func Test_enableAllFilter(t *testing.T) {
148148
Fast: ptr.Pointer(true),
149149
Presets: nil,
150150
},
151-
expected: []string{"asasalint", "bodyclose", "canonicalheader", "containedctx", "contextcheck", "durationcheck", "err113", "errcheck", "errchkjson", "errname", "errorlint", "exhaustive", "exhaustruct", "exptostd", "fatcontext", "forbidigo", "forcetypeassert", "ginkgolinter", "gochecknoglobals", "gochecksumtype", "gocritic", "gosec", "gosimple", "gosmopolitan", "govet", "iface", "importas", "intrange", "ireturn", "loggercheck", "makezero", "mirror", "musttag", "nilerr", "nilnesserr", "nilnil", "noctx", "nonamedreturns", "paralleltest", "perfsprint", "protogetter", "reassign", "recvcheck", "revive", "rowserrcheck", "sloglint", "spancheck", "sqlclosecheck", "staticcheck", "stylecheck", "tagliatelle", "tenv", "testifylint", "thelper", "tparallel", "unconvert", "unparam", "unused", "usetesting", "varnamelen", "wastedassign", "wrapcheck", "zerologlint"},
151+
expected: []string{"asasalint", "bodyclose", "canonicalheader", "containedctx", "contextcheck", "durationcheck", "err113", "errcheck", "errchkjson", "errname", "errorlint", "exhaustive", "exhaustruct", "exptostd", "fatcontext", "forbidigo", "forcetypeassert", "ginkgolinter", "gochecknoglobals", "gochecksumtype", "gocritic", "gosec", "gosimple", "gosmopolitan", "govet", "iface", "importas", "intrange", "ireturn", "loggercheck", "makezero", "mirror", "musttag", "nilerr", "nilnesserr", "nilnil", "noctx", "nonamedreturns", "paralleltest", "perfsprint", "protogetter", "reassign", "recvcheck", "revive", "rowserrcheck", "sloglint", "spancheck", "sqlclosecheck", "staticcheck", "stylecheck", "tagliatelle", "testifylint", "thelper", "tparallel", "unconvert", "unparam", "unused", "usetesting", "varnamelen", "wastedassign", "wrapcheck", "zerologlint"},
152152
},
153153
{
154154
desc: "disable",
@@ -168,7 +168,7 @@ func Test_enableAllFilter(t *testing.T) {
168168
Fast: ptr.Pointer(true),
169169
Presets: nil,
170170
},
171-
expected: []string{"asasalint", "bodyclose", "canonicalheader", "containedctx", "contextcheck", "durationcheck", "err113", "errcheck", "errchkjson", "errname", "errorlint", "exhaustive", "exhaustruct", "exptostd", "fatcontext", "forbidigo", "forcetypeassert", "ginkgolinter", "gochecknoglobals", "gochecksumtype", "gocritic", "gosec", "gosimple", "gosmopolitan", "govet", "iface", "importas", "intrange", "ireturn", "lll", "loggercheck", "makezero", "mirror", "misspell", "musttag", "nilerr", "nilnesserr", "nilnil", "noctx", "nonamedreturns", "paralleltest", "perfsprint", "protogetter", "reassign", "recvcheck", "revive", "rowserrcheck", "sloglint", "spancheck", "sqlclosecheck", "staticcheck", "stylecheck", "tagliatelle", "tenv", "testifylint", "thelper", "tparallel", "unconvert", "unparam", "unused", "usetesting", "varnamelen", "wastedassign", "wrapcheck", "zerologlint"},
171+
expected: []string{"asasalint", "bodyclose", "canonicalheader", "containedctx", "contextcheck", "durationcheck", "err113", "errcheck", "errchkjson", "errname", "errorlint", "exhaustive", "exhaustruct", "exptostd", "fatcontext", "forbidigo", "forcetypeassert", "ginkgolinter", "gochecknoglobals", "gochecksumtype", "gocritic", "gosec", "gosimple", "gosmopolitan", "govet", "iface", "importas", "intrange", "ireturn", "lll", "loggercheck", "makezero", "mirror", "misspell", "musttag", "nilerr", "nilnesserr", "nilnil", "noctx", "nonamedreturns", "paralleltest", "perfsprint", "protogetter", "reassign", "recvcheck", "revive", "rowserrcheck", "sloglint", "spancheck", "sqlclosecheck", "staticcheck", "stylecheck", "tagliatelle", "testifylint", "thelper", "tparallel", "unconvert", "unparam", "unused", "usetesting", "varnamelen", "wastedassign", "wrapcheck", "zerologlint"},
172172
},
173173
{
174174
desc: "disable, enable, fast",
@@ -179,7 +179,7 @@ func Test_enableAllFilter(t *testing.T) {
179179
Fast: ptr.Pointer(true),
180180
Presets: nil,
181181
},
182-
expected: []string{"asasalint", "bodyclose", "containedctx", "contextcheck", "durationcheck", "err113", "errcheck", "errchkjson", "errorlint", "exhaustive", "exhaustruct", "exptostd", "fatcontext", "forbidigo", "forcetypeassert", "ginkgolinter", "gochecknoglobals", "gochecksumtype", "gocritic", "gosec", "gosimple", "gosmopolitan", "govet", "iface", "importas", "intrange", "ireturn", "lll", "loggercheck", "makezero", "mirror", "misspell", "musttag", "nilerr", "nilnesserr", "nilnil", "noctx", "nonamedreturns", "paralleltest", "perfsprint", "protogetter", "reassign", "recvcheck", "revive", "rowserrcheck", "sloglint", "spancheck", "sqlclosecheck", "staticcheck", "stylecheck", "tagliatelle", "tenv", "testifylint", "thelper", "tparallel", "unconvert", "unparam", "unused", "usetesting", "varnamelen", "wastedassign", "wrapcheck", "zerologlint"},
182+
expected: []string{"asasalint", "bodyclose", "containedctx", "contextcheck", "durationcheck", "err113", "errcheck", "errchkjson", "errorlint", "exhaustive", "exhaustruct", "exptostd", "fatcontext", "forbidigo", "forcetypeassert", "ginkgolinter", "gochecknoglobals", "gochecksumtype", "gocritic", "gosec", "gosimple", "gosmopolitan", "govet", "iface", "importas", "intrange", "ireturn", "lll", "loggercheck", "makezero", "mirror", "misspell", "musttag", "nilerr", "nilnesserr", "nilnil", "noctx", "nonamedreturns", "paralleltest", "perfsprint", "protogetter", "reassign", "recvcheck", "revive", "rowserrcheck", "sloglint", "spancheck", "sqlclosecheck", "staticcheck", "stylecheck", "tagliatelle", "testifylint", "thelper", "tparallel", "unconvert", "unparam", "unused", "usetesting", "varnamelen", "wastedassign", "wrapcheck", "zerologlint"},
183183
},
184184
}
185185

pkg/commands/internal/migrate/migrate_linters_settings.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ func toLinterSettings(old versionone.LintersSettings) versiontwo.LintersSettings
7676
Staticcheck: toStaticCheckSettings(old),
7777
TagAlign: toTagAlignSettings(old.TagAlign),
7878
Tagliatelle: toTagliatelleSettings(old.Tagliatelle),
79-
Tenv: toTenvSettings(old.Tenv),
8079
Testifylint: toTestifylintSettings(old.Testifylint),
8180
Testpackage: toTestpackageSettings(old.Testpackage),
8281
Thelper: toThelperSettings(old.Thelper),
@@ -816,12 +815,6 @@ func toTagliatelleSettings(old versionone.TagliatelleSettings) versiontwo.Taglia
816815
return versiontwo.TagliatelleSettings{Case: tcase}
817816
}
818817

819-
func toTenvSettings(old versionone.TenvSettings) versiontwo.TenvSettings {
820-
return versiontwo.TenvSettings{
821-
All: old.All,
822-
}
823-
}
824-
825818
func toTestifylintSettings(old versionone.TestifylintSettings) versiontwo.TestifylintSettings {
826819
return versiontwo.TestifylintSettings{
827820
EnableAll: old.EnableAll,

pkg/commands/internal/migrate/testdata/linters-settings_tenv.golden.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

pkg/commands/internal/migrate/testdata/linters-settings_tenv.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

pkg/commands/internal/migrate/testdata/linters_02.golden.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ linters:
9191
- staticcheck
9292
- tagalign
9393
- tagliatelle
94-
- tenv
9594
- testableexamples
9695
- testifylint
9796
- testpackage

pkg/commands/internal/migrate/testdata/linters_03.golden.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ linters:
4141
- mnd
4242
- mycustomlinter3
4343
- mycustomlinter4
44-
- tenv
4544
formatters:
4645
enable:
4746
- gofmt

pkg/commands/internal/migrate/testdata/linters_06.golden.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ linters:
4343
- mnd
4444
- mycustomlinter3
4545
- mycustomlinter4
46-
- tenv
4746
formatters:
4847
enable:
4948
- gci

pkg/commands/internal/migrate/testdata/linters_08.golden.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ linters:
6464
- sqlclosecheck
6565
- staticcheck
6666
- tagliatelle
67-
- tenv
6867
- testifylint
6968
- thelper
7069
- tparallel

0 commit comments

Comments
 (0)