Skip to content

Commit a7e11f8

Browse files
committed
review
1 parent fe69114 commit a7e11f8

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

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

+4-7
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,12 @@ func skipFile(path string) bool {
6969
return true
7070
}
7171

72-
if filepath.Base(path) == "base_loader.go" {
73-
return true
74-
}
75-
76-
if filepath.Base(path) == "loader.go" {
72+
switch filepath.Base(path) {
73+
case "base_loader.go", "loader.go":
7774
return true
75+
default:
76+
return false
7877
}
79-
80-
return false
8178
}
8279

8380
func processFile(file *ast.File) {

pkg/commands/internal/migrate/migrate_formatters.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func toGciSettings(old versionone.GciSettings) versiontwo.GciSettings {
6767
NoInlineComments: old.NoInlineComments,
6868
NoPrefixComments: old.NoPrefixComments,
6969
CustomOrder: old.CustomOrder,
70-
NoLexOrder: old.CustomOrder,
70+
NoLexOrder: old.NoLexOrder,
7171
}
7272
}
7373

pkg/commands/internal/migrate/migrate_linters_settings.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -791,10 +791,8 @@ func toSpancheckSettings(old versionone.SpancheckSettings) versiontwo.SpancheckS
791791
func toStaticCheckSettings(old versionone.LintersSettings) versiontwo.StaticCheckSettings {
792792
checks := slices.Concat(old.Staticcheck.Checks, old.Stylecheck.Checks, old.Gosimple.Checks)
793793

794-
slices.Sort(checks)
795-
796794
return versiontwo.StaticCheckSettings{
797-
Checks: slices.Compact(checks),
795+
Checks: Unique(checks),
798796
Initialisms: old.Stylecheck.Initialisms,
799797
DotImportWhitelist: old.Stylecheck.DotImportWhitelist,
800798
HTTPStatusCodeWhitelist: old.Stylecheck.HTTPStatusCodeWhitelist,

0 commit comments

Comments
 (0)