mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
jobspec2: isolate package from Nomad core and BUSL. (#25021)
This commit is contained in:
@@ -182,6 +182,14 @@ check: ## Lint the source code
|
||||
@echo "==> Check API package is isolated from rest..."
|
||||
@cd ./api && if go list --test -f '{{ join .Deps "\n" }}' . | grep github.com/hashicorp/nomad/ | grep -v -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 jobspec2 package is isolated from Nomad core..."
|
||||
@cd ./jobspec2 && \
|
||||
if go list --test -f '{{ join .Deps "\n" }}' . | \
|
||||
grep github.com/hashicorp/nomad/ | \
|
||||
grep -v -e /nomad/jobspec2/ -e nomad/jobspec2.test | \
|
||||
grep -v -e /nomad/api ; then echo \
|
||||
" /jobspec2 package depends the ^^ above internal nomad packages. Remove such dependency"; exit 1; fi
|
||||
|
||||
@echo "==> Check command package does not import structs..."
|
||||
@cd ./command && if go list -f '{{ join .Imports "\n" }}' . | grep github.com/hashicorp/nomad/nomad/structs; then echo " /command package imports the structs pkg. Remove such import"; exit 1; fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user