Add ineffassign to go-compile, use tmp files to ensure proper failure

handling

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
This commit is contained in:
Riyaz Faizullabhoy
2017-04-10 12:18:42 -07:00
parent 28f3f2c946
commit 31a8480878
3 changed files with 13 additions and 5 deletions

View File

@@ -1,8 +1,9 @@
FROM alpine:3.5
RUN apk update && apk add --no-cache build-base git go
ENV GOPATH=/go PATH=$PATH:/go/bin
RUN go get -u github.com/golang/lint/golint
RUN go get -u github.com/LK4D4/vndr
RUN go get -u github.com/golang/lint/golint && \
go get -u github.com/gordonklaus/ineffassign && \
go get -u github.com/LK4D4/vndr
COPY . ./

View File

@@ -61,6 +61,9 @@ test -z $(GOOS=linux go tool vet -printf=false . 2>&1 | grep -v vendor/ | tee /d
>&2 echo "golint..."
test -z $(find . -type f -name "*.go" -not -path "*/vendor/*" -not -name "*.pb.*" -exec golint {} \; | tee /dev/stderr)
>&2 echo "ineffassign..."
test -z $(find . -type f -name "*.go" -not -path "*/vendor/*" -not -name "*.pb.*" -exec ineffassign {} \; | tee /dev/stderr)
>&2 echo "go build..."
if [ "$GOOS" = "darwin" ]