diff --git a/GNUmakefile b/GNUmakefile index c73c0052f..e917b2697 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -179,6 +179,9 @@ check: ## Lint the source code @echo "==> Check API package is isolated from rest" @if go list --test -f '{{ join .Deps "\n" }}' ./api | grep github.com/hashicorp/nomad/ | grep -v -e /vendor/ -e /nomad/api/ -e nomad/api.test; then echo " /api package depends the ^^ above internal nomad packages. Remove such dependency"; exit 1; fi + @echo "==> Check non-vendored packages" + @if go list --test -tags "$(GO_TAGS)" -f '{{join .Deps "\n"}}' . | grep -v github.com/hashicorp/nomad.test | xargs go list -tags "$(GO_TAGS)" -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | grep -v -e github.com/hashicorp/nomad; then echo " found referenced packages ^^ that are not vendored"; exit 1; fi + .PHONY: checkscripts checkscripts: ## Lint shell scripts @echo "==> Linting scripts..."