make: emit explanation for /api isolation

Emit a slightly helpful message when /api depends on nomad internal
packages.
This commit is contained in:
Mahmood Ali
2020-02-03 12:22:10 -05:00
parent 2e0f98c97a
commit 41d5a690cf

View File

@@ -177,7 +177,7 @@ check: ## Lint the source code
@if (git status | grep -q .pb.go); then echo the following proto files are out of sync; git status |grep .pb.go; exit 1; fi
@echo "==> Check API package is isolated from rest"
@! go list --test -f '{{ join .Deps "\n" }}' ./api | grep github.com/hashicorp/nomad/ | grep -v -e /vendor/ -e /nomad/api/ -e nomad/api.test
@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
.PHONY: checkscripts
checkscripts: ## Lint shell scripts