Skip to content

Commit

Permalink
Update golanci-lint to v1.33.0 and enable govet (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusweig committed Nov 29, 2020
1 parent 9749c9e commit 1bfd342
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Expand Up @@ -45,6 +45,8 @@ linters:
- goimports
- golint
- gosimple
- govet
- ineffassign
- interfacer
- maligned
- misspell
Expand Down
2 changes: 1 addition & 1 deletion cmd/krew/cmd/install_test.go
Expand Up @@ -22,7 +22,7 @@ import (
)

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

tests := []struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/krew/cmd/internal/setup_check_test.go
Expand Up @@ -77,7 +77,7 @@ func TestIsBinDirInPATH_NonNormalized(t *testing.T) {
func TestSetupInstructions_windows(t *testing.T) {
const instructionsContain = `USERPROFILE`
os.Setenv("KREW_OS", "windows")
defer func() { os.Unsetenv("KREW_OS") }()
defer os.Unsetenv("KREW_OS")
instructions := SetupInstructions()
if !strings.Contains(instructions, instructionsContain) {
t.Errorf("expected %q\nto contain %q", instructions, instructionsContain)
Expand Down
2 changes: 1 addition & 1 deletion hack/run-lint.sh
Expand Up @@ -23,7 +23,7 @@ gopath="$(go env GOPATH)"
if ! [[ -x "$gopath/bin/golangci-lint" ]]; then
echo >&2 'Installing golangci-lint'
curl --silent --fail --location \
https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b "$gopath/bin" v1.27.0
https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b "$gopath/bin" v1.33.0
fi

# configured by .golangci.yml
Expand Down

0 comments on commit 1bfd342

Please sign in to comment.