From 0d27c51913b2debca40685113d489f0894472fda Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 6 Jan 2026 14:53:40 +0100 Subject: [PATCH] hack/validate: only search repo-dir for modules Minor enhancement / follow-up to c8aaeea285c63f9add09e01bd8260d1bce61a97d; make sure we never attempt to find `go.mod` files in other locations. Signed-off-by: Sebastiaan van Stijn --- hack/validate/golangci-lint | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/validate/golangci-lint b/hack/validate/golangci-lint index 06459d9729..3bb566ce0d 100755 --- a/hack/validate/golangci-lint +++ b/hack/validate/golangci-lint @@ -16,7 +16,7 @@ if pkg-config 'libsystemd' 2> /dev/null; then fi # Note: exclude github.com/docker/docker/man as it contains no Go code. -mods=($(find . -name "go.mod" -type f -exec dirname {} \; | grep -v "man" | sort -u)) +mods=($(find "${REPODIR}" -name "go.mod" -type f -exec dirname {} \; | grep -v "/man" | sort -u)) for mod in "${mods[@]}"; do pushd "${mod}" > /dev/null echo -e "\n\033[0;36mINFO\033[0m Start validation for module '${mod}' with golang-ci-lint"