mirror of
https://github.com/moby/moby.git
synced 2026-01-11 02:31:44 +00:00
ci: run golangci-lint for each Go module
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
This commit is contained in:
@@ -15,13 +15,19 @@ if pkg-config 'libsystemd' 2> /dev/null; then
|
||||
DOCKER_BUILDTAGS+=" journald"
|
||||
fi
|
||||
|
||||
echo -e "\n\033[0;36mINFO\033[0m Start validation with golang-ci-lint"
|
||||
# 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))
|
||||
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"
|
||||
|
||||
# TODO use --out-format=junit-xml and store artifacts
|
||||
# shellcheck disable=SC2086
|
||||
GOGC=75 golangci-lint run \
|
||||
${GOLANGCI_LINT_OPTS} \
|
||||
--print-resources-usage \
|
||||
--build-tags="${DOCKER_BUILDTAGS}" \
|
||||
--verbose \
|
||||
--config "${REPODIR}/.golangci.yml"
|
||||
# TODO use --out-format=junit-xml and store artifacts
|
||||
# shellcheck disable=SC2086
|
||||
GOGC=75 golangci-lint run \
|
||||
${GOLANGCI_LINT_OPTS} \
|
||||
--print-resources-usage \
|
||||
--build-tags="${DOCKER_BUILDTAGS}" \
|
||||
--verbose \
|
||||
--config "${REPODIR}/.golangci.yml"
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user