Skip to content

Commit

Permalink
Remove golint test cases for deprecated lints.
Browse files Browse the repository at this point in the history
I looked for a changelog describing when these lints were deprecated,
but I couldn't find anything. Other lints are still working so /shrug.
  • Loading branch information
cjwagner committed Sep 7, 2023
1 parent 2717241 commit 2a4ffa1
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions prow/plugins/golint/golint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,30 +345,6 @@ func testLintCodeSuggestion(clients localgit.Clients, t *testing.T) {
},
comment: "",
},
{
name: "Check variable declaration: should drop type",
codeChange: "@@ -0,0 +1,9 @@\n+/*\n+Package bar comment\n+*/\n+package bar\n+\n+func f() {\n+var myInt int = 7\n+}\n+",
pullFiles: map[string][]byte{
"qux.go": []byte("/*\nPackage bar comment\n*/\npackage bar\n\nfunc f() {\nvar myInt int = 7\n}\n"),
},
comment: "```suggestion\nvar myInt = 7\n```\nGolint type-inference: should omit type int from declaration of var myInt; it will be inferred from the right-hand side. <!-- golint -->",
},
{
name: "Check variable declaration: should drop value (int)",
codeChange: "@@ -0,0 +1,9 @@\n+/*\n+Package bar comment\n+*/\n+package bar\n+\n+func f() {\n+var myZeroInt int = 0\n+}\n+",
pullFiles: map[string][]byte{
"qux.go": []byte("/*\nPackage bar comment\n*/\npackage bar\n\nfunc f() {\nvar myZeroInt int = 0\n}\n"),
},
comment: "```suggestion\nvar myZeroInt int\n```\nGolint zero-value: should drop = 0 from declaration of var myZeroInt; it is the zero value. <!-- golint -->",
},
{
name: "Check variable declaration: should drop value (float32)",
codeChange: "@@ -0,0 +1,9 @@\n+/*\n+Package bar comment\n+*/\n+package bar\n+\n+func f() {\n+var myZeroFlt float32 = 0.\n+}\n+",
pullFiles: map[string][]byte{
"qux.go": []byte("/*\nPackage bar comment\n*/\npackage bar\n\nfunc f() {\nvar myZeroFlt float32 = 0.\n}\n"),
},
comment: "```suggestion\nvar myZeroFlt float32\n```\nGolint zero-value: should drop = 0. from declaration of var myZeroFlt; it is the zero value. <!-- golint -->",
},
{
name: "Check variable declaration: no value suggestion",
codeChange: "@@ -0,0 +1,9 @@\n+/*\n+Package bar comment\n+*/\n+package bar\n+\n+func f() {\n+var myZeroRune2 rune\n+}\n+",
Expand Down

0 comments on commit 2a4ffa1

Please sign in to comment.