File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Go and compilation related variables
2
2
BUILD_DIR ?= out
3
+ GOPATH ?= $(shell go env GOPATH)
3
4
4
5
ORG := github.com/machine-drivers
5
6
REPOPATH ?= $(ORG ) /docker-machine-driver-hyperkit
7
+ GOLANGCI_LINT_VERSION =v1.39.0
6
8
7
9
default : build
8
10
@@ -27,9 +29,15 @@ build: $(BUILD_DIR) vendor lint test
27
29
-o $(BUILD_DIR ) /crc-driver-hyperkit
28
30
chmod +x $(BUILD_DIR ) /crc-driver-hyperkit
29
31
32
+ .PHONY : golangci-lint
33
+ golangci-lint :
34
+ @if $(GOPATH ) /bin/golangci-lint version 2>&1 | grep -vq $(GOLANGCI_LINT_VERSION ) ; then\
35
+ pushd /tmp && GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION ) && popd ; \
36
+ fi
37
+
30
38
.PHONY : lint
31
- lint :
32
- golangci-lint run
39
+ lint : golangci-lint
40
+ $( GOPATH ) /bin/ golangci-lint run
33
41
34
42
.PHONY : test
35
43
test :
You can’t perform that action at this time.
0 commit comments