Skip to content

Commit

Permalink
rpk/makefile: download golangcilint with recommended method
Browse files Browse the repository at this point in the history
Downloading using go get is not recommended per
golangci-lint docs
  • Loading branch information
r-vasquez committed Nov 14, 2024
1 parent 8d2c633 commit 0e655a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/go/rpk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ endif

GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
GOPATH ?= $(shell go env GOPATH)
OUTDIR := $(GOOS)-$(GOARCH)

REV := $(shell git rev-parse --short HEAD)
Expand Down Expand Up @@ -64,8 +65,7 @@ run_gofumpt:
$(GOFUMPT_OS_CMD)

install_golangci_lint:
@echo "installing golangci-lint"
@$(GOCMD) install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
@which $(GOLANGCILINTCMD) || (if [ $$? -eq 1 ]; then echo "golangci-lint not found, installing..."; curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.62.0; fi)

run_linter:
$(GOLANGCILINTCMD) run
Expand Down

0 comments on commit 0e655a6

Please sign in to comment.