From 41d5a690cf2e5a297316e26650efd402485985ea Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Mon, 3 Feb 2020 12:22:10 -0500 Subject: [PATCH] make: emit explanation for /api isolation Emit a slightly helpful message when /api depends on nomad internal packages. --- GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index bdfadac8a..a09f5fdc3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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