Files
docker-machine/mk/validate.mk
Julien Barbot 46b43ebeea Update path of golint
The new path is golang.org/x/lint/golint.
See ead987a65e.

Signed-off-by: Julien Barbot <jubarbot@cisco.com>
2018-10-31 16:39:04 -07:00

21 lines
797 B
Makefile

# Validate DCO on all history
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
# XXX vendorized script miss exec bit, hence the gymnastic
# plus the path resolution...
# TODO migrate away from the shell script and have a make equivalent instead
dco:
@echo `bash $(current_dir)/../script/validate-dco`
fmt:
@test -z "$$(gofmt -s -l . 2>&1 | grep -v vendor/ | tee /dev/stderr)"
vet:
@test -z "$$(go vet $(PKGS) 2>&1 | tee /dev/stderr)"
lint:
$(if $(GOLINT), , \
$(error Please install golint: go get -u golang.org/x/lint/golint))
@test -z "$$($(GOLINT) ./... 2>&1 | grep -v vendor/ | grep -v "cli/" | grep -v "amazonec2/" |grep -v "openstack/" |grep -v "softlayer/" | grep -v "should have comment" | tee /dev/stderr)"