Skip to content

Commit 1bfd342

Browse files
Update golanci-lint to v1.33.0 and enable govet (#670)
1 parent 9749c9e commit 1bfd342

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ linters:
4545
- goimports
4646
- golint
4747
- gosimple
48+
- govet
49+
- ineffassign
4850
- interfacer
4951
- maligned
5052
- misspell

cmd/krew/cmd/install_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
func Test_readPluginFromURL(t *testing.T) {
25-
server := httptest.NewServer(http.FileServer(http.Dir(filepath.Join("../../../integration_test/testdata"))))
25+
server := httptest.NewServer(http.FileServer(http.Dir(filepath.FromSlash("../../../integration_test/testdata"))))
2626
defer server.Close()
2727

2828
tests := []struct {

cmd/krew/cmd/internal/setup_check_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func TestIsBinDirInPATH_NonNormalized(t *testing.T) {
7777
func TestSetupInstructions_windows(t *testing.T) {
7878
const instructionsContain = `USERPROFILE`
7979
os.Setenv("KREW_OS", "windows")
80-
defer func() { os.Unsetenv("KREW_OS") }()
80+
defer os.Unsetenv("KREW_OS")
8181
instructions := SetupInstructions()
8282
if !strings.Contains(instructions, instructionsContain) {
8383
t.Errorf("expected %q\nto contain %q", instructions, instructionsContain)

hack/run-lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ gopath="$(go env GOPATH)"
2323
if ! [[ -x "$gopath/bin/golangci-lint" ]]; then
2424
echo >&2 'Installing golangci-lint'
2525
curl --silent --fail --location \
26-
https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b "$gopath/bin" v1.27.0
26+
https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b "$gopath/bin" v1.33.0
2727
fi
2828

2929
# configured by .golangci.yml

0 commit comments

Comments
 (0)