diff --git a/hack/make.ps1 b/hack/make.ps1 index ea573a4a65..82a38f3cfc 100644 --- a/hack/make.ps1 +++ b/hack/make.ps1 @@ -263,6 +263,7 @@ Function Validate-PkgImports($headCommit, $upstreamCommit) { # Filter out what we are looking for $imports = @() + $imports -NotMatch "^github.com/docker/docker/pkg/" ` -NotMatch "^github.com/docker/docker/vendor" ` + -NotMatch "^github.com/docker/docker/internal" ` -Match "^github.com/docker/docker" ` -Replace "`n", "" $imports | ForEach-Object{ $badFiles+="$file imports $_`n" } diff --git a/hack/validate/pkg-imports b/hack/validate/pkg-imports index 1045bd8615..2f50f2de7c 100755 --- a/hack/validate/pkg-imports +++ b/hack/validate/pkg-imports @@ -11,7 +11,12 @@ unset IFS badFiles=() for f in "${files[@]}"; do IFS=$'\n' - badImports=($(go list -e -f '{{ join .Deps "\n" }}' "$f" | sort -u | grep -vE '^github.com/docker/docker/pkg/' | grep -vE '^github.com/docker/docker/vendor' | grep -E '^github.com/docker/docker' || true)) + badImports=($(go list -e -f '{{ join .Deps "\n" }}' "$f" | sort -u \ + | grep -vE '^github.com/docker/docker/pkg/' \ + | grep -vE '^github.com/docker/docker/vendor' \ + | grep -vE '^github.com/docker/docker/internal' \ + | grep -E '^github.com/docker/docker' \ + || true)) unset IFS for import in "${badImports[@]}"; do