1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/hack/validate/gometalinter
Kir Kolyshkin c11508a5f4 gometalinter: fix --deadline option
1. Add = between the option and the argument, otherwise the argument
   appears to be passed on to the linters directly, as in:

> DEBUG: [golint.8]: executing /home/kir/go/bin/golint
> -min_confidence 0.800000 ./10m ./api ./api/errdefs <...>

2. Fix setting the default for GOMETALINTER_OPTS -- the default
   was -deadline (rather than --deadline).

Fixes: b96093fa56 ("gometalinter: add per-platform configurable options")

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-01-16 14:37:11 -08:00

13 lines
406 B
Bash
Executable file

#!/usr/bin/env bash
set -e -o pipefail
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# CI platforms differ, so per-platform GOMETALINTER_OPTS can be set
# from a platform-specific Dockerfile, otherwise let's just set
# (somewhat pessimistic) default of 10 minutes.
: ${GOMETALINTER_OPTS=--deadline=10m}
gometalinter \
${GOMETALINTER_OPTS} \
--config $SCRIPTDIR/gometalinter.json ./...