1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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>
This commit is contained in:
Kir Kolyshkin 2018-01-16 14:33:06 -08:00
parent be14665210
commit c11508a5f4
4 changed files with 6 additions and 4 deletions

View file

@ -190,7 +190,7 @@ RUN ln -s /usr/local/completion/bash/docker /etc/bash_completion.d/docker
ENTRYPOINT ["hack/dind"]
# Options for hack/validate/gometalinter
ENV GOMETALINTER_OPTS="--deadline 2m"
ENV GOMETALINTER_OPTS="--deadline=2m"
# Upload docker source
COPY . /go/src/github.com/docker/docker

View file

@ -159,7 +159,7 @@ ENV PATH=/usr/local/cli:$PATH
ENTRYPOINT ["hack/dind"]
# Options for hack/validate/gometalinter
ENV GOMETALINTER_OPTS="--deadline 4m -j2"
ENV GOMETALINTER_OPTS="--deadline=4m -j2"
# Upload docker source
COPY . /go/src/github.com/docker/docker

View file

@ -147,7 +147,7 @@ ENV PATH=/usr/local/cli:$PATH
ENTRYPOINT ["hack/dind"]
# Options for hack/validate/gometalinter
ENV GOMETALINTER_OPTS="--deadline 10m -j2"
ENV GOMETALINTER_OPTS="--deadline=10m -j2"
# Upload docker source
COPY . /go/src/github.com/docker/docker

View file

@ -6,6 +6,8 @@ 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:--deadine 10m} \
${GOMETALINTER_OPTS} \
--config $SCRIPTDIR/gometalinter.json ./...