@@ -47,7 +47,8 @@ build-cadctl: check-go121-install ## Build the cadctl binary
47
47
lint-cadctl : install-linter # # Lint cadctl subproject
48
48
@echo
49
49
@echo " Linting cadctl..."
50
- GOLANGCI_LINT_CACHE=$$(mktemp -d ) $(GOPATH ) /bin/golangci-lint run -c .golangci.yml
50
+ # Explicitly set GOROOT, see https://github.com/golangci/golangci-lint/issues/3107
51
+ GOROOT=/usr/lib/golang GOLANGCI_LINT_CACHE=$$(mktemp -d ) $(GOPATH ) /bin/golangci-lint run -c .golangci.yml
51
52
52
53
.PHONY : test-cadctl
53
54
test-cadctl : check-go121-install # # Run automated tests for cadctl
@@ -69,7 +70,8 @@ build-interceptor: check-go121-install ## Build the interceptor binary
69
70
lint-interceptor : install-linter # # Lint interceptor subproject
70
71
@echo
71
72
@echo " Linting interceptor..."
72
- cd interceptor && GOLANGCI_LINT_CACHE=$$(mktemp -d ) $(GOPATH ) /bin/golangci-lint run -c ../.golangci.yml
73
+ # Explicitly set GOROOT, see https://github.com/golangci/golangci-lint/issues/3107
74
+ cd interceptor && GOROOT=/usr/lib/golang GOLANGCI_LINT_CACHE=$$(mktemp -d ) $(GOPATH ) /bin/golangci-lint run -c ../.golangci.yml
73
75
74
76
.PHONY : test-interceptor
75
77
test-interceptor : check-go121-install check-jq-install build-interceptor # # Run unit tests for interceptor
@@ -102,7 +104,8 @@ build-template-updater: ## Build the template-updater binary
102
104
lint-template-updater : install-linter # # Lint template-updater subproject
103
105
@echo
104
106
@echo " Linting template-updater..."
105
- cd hack/update-template && GOLANGCI_LINT_CACHE=$$(mktemp -d ) $(GOPATH ) /bin/golangci-lint run -c ../../.golangci.yml
107
+ # Explicitly set GOROOT, see https://github.com/golangci/golangci-lint/issues/3107
108
+ cd hack/update-template && GOROOT=/usr/lib/golang GOLANGCI_LINT_CACHE=$$(mktemp -d ) $(GOPATH ) /bin/golangci-lint run -c ../../.golangci.yml
106
109
107
110
.PHONY : boilerplate-update
108
111
boilerplate-update : # # Update boilerplate version
0 commit comments