@@ -73,31 +73,17 @@ GO_BUILD_TOOL_WORKDIR = /scaler
7373
7474.PHONY : lint
7575lint : modules
76- @echo Installing linters...
77- @test -e $(GOPATH ) /bin/impi || \
78- curl -s https://api.github.com/repos/pavius/impi/releases/latest \
79- | grep -i " browser_download_url.*impi.*$( OS_NAME) " \
80- | cut -d : -f 2,3 \
81- | tr -d \" \
82- | wget -O $(GOPATH ) /bin/impi -qi -
83- @test -e $(GOPATH ) /bin/golangci-lint || \
84- (curl -sSfL https ://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH ) /bin v1.50.1)
85-
86- @echo Verifying imports...
87- chmod +x $(GOPATH)/bin/impi && $(GOPATH)/bin/impi \
88- --local github.com/v3io/scaler/ \
89- --scheme stdLocalThirdParty \
90- --skip pkg/platform/kube/apis \
91- --skip pkg/platform/kube/client \
92- ./cmd/... ./pkg/...
76+ @test -e .bin/golangci-lint || \
77+ (curl -sSfL https ://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b .bin v1.55.1)
9378
9479 @echo Linting...
95- $(GOPATH)/ bin/golangci-lint run -v
80+ . bin/golangci-lint run -v
9681 @echo Done.
9782
9883.PHONY : fmt
9984fmt :
10085 gofmt -s -w .
86+ .bin/golangci-lint run --fix ./...
10187
10288.PHONY : test-undockerized
10389test-undockerized : modules
@@ -116,13 +102,8 @@ test:
116102 $(SCALER_DOCKER_TEST_TAG) \
117103 /bin/bash -c "make test-undockerized"
118104
119- .PHONY : ensure-gopath
120- ensure-gopath :
121- ifndef GOPATH
122- $(error GOPATH must be set)
123- endif
124105
125106.PHONY : modules
126- modules : ensure-gopath
107+ modules :
127108 @echo Getting go modules
128109 @go mod download
0 commit comments