Skip to content

Commit

Permalink
Replace golangci with standard tools
Browse files Browse the repository at this point in the history
  • Loading branch information
dramich authored and Craig Jellick committed May 1, 2019
1 parent b4bdcfd commit c0e1788
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 60 deletions.
45 changes: 0 additions & 45 deletions .golangci.json

This file was deleted.

7 changes: 2 additions & 5 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH_arm64=arm64 GOLAN
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash

RUN wget -O - https://storage.googleapis.com/golang/go1.11.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
go get github.com/rancher/trash

RUN if [ "${ARCH}" == "amd64" ]; then \
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.16.0; \
fi
go get github.com/rancher/trash && \
go get -u golang.org/x/lint/golint

ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \
DOCKER_URL_arm=https://github.com/rancher/docker/releases/download/v1.10.3-ros1/docker-1.10.3_arm \
Expand Down
4 changes: 3 additions & 1 deletion scripts/ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ set -e

cd $(dirname $0)

./validate
if [ ${ARCH} == amd64 ]; then
./validate
fi
./build
./test
./package
Expand Down
16 changes: 7 additions & 9 deletions scripts/validate
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ set -e

cd $(dirname $0)/..

if ! command -v golangci-lint; then
echo Skipping validation: no golangci-lint available
exit
fi
echo Running: golang-ci
if [ -n "$(golangci-lint run | tee /dev/stderr)" ]; then
failed=true
fi
test -z "$failed"
echo Running: go fmt
test -z "$(go fmt ./... | tee /dev/stderr)"

echo Running: go vet
test -z "$(go vet ./... | tee /dev/stderr)"

echo Running: golint
test -z "$(go list ./... | grep -v /vendor/ | xargs -L1 golint | grep -v 'or be unexported' | tee /dev/stderr)"

0 comments on commit c0e1788

Please sign in to comment.