Skip to content

Commit

Permalink
Make lint work without a $GOPATH. (#1374)
Browse files Browse the repository at this point in the history
Also document the need for $GOBIN to be in developer's $PATH.

Signed-off-by: Marcin Owsiany <mowsiany@D2iQ.com>
  • Loading branch information
porridge committed Mar 3, 2020
1 parent ddd65ed commit d83fa72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You can find the full text of the DCO here: https://developercertificate.org/
### Pre-requisites

- Git
- Go `1.13` or later
- Go `1.13` or later. Note that some [Makefile](Makefile) targets assume that your `$GOBIN` is in your `$PATH`.
- [Kubebuilder](https://book.kubebuilder.io/quick-start.html#installation) version 2 or later - note that it is only needed for the `kube-apiserver` and `etcd` binaries, so no need to install *its* dependencies (such as `kustomize`).
- A Kubernetes Cluster running version `1.13` or later (e.g., [kind](https://kind.sigs.k8s.io/) or [Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/))
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ test-clean:

.PHONY: lint
lint:
if [ ! -f ${GOPATH}/bin/golangci-lint ]; then ./hack/install-golangcilint.sh; fi
${GOPATH}/bin/golangci-lint run
ifeq (, $(shell which golangci-lint))
./hack/install-golangcilint.sh
endif
golangci-lint run

.PHONY: download
download:
Expand Down

0 comments on commit d83fa72

Please sign in to comment.