diff --git a/Makefile b/Makefile index b432bd18b..2cd4f6b87 100644 --- a/Makefile +++ b/Makefile @@ -118,6 +118,7 @@ tests: $(CODECGEN_TARGETS) prog/staticui/staticui.go prog/externalui/externalui. ./tools/test -no-go-get -tags $(GO_BUILD_TAGS) lint: + golangci-lint run ./tools/lint prog/staticui/staticui.go: diff --git a/backend/Dockerfile b/backend/Dockerfile index 201849f3b..a3ced7a94 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -11,20 +11,9 @@ RUN set -eux; \ \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -RUN go clean -i net && \ - go install -tags netgo std && \ - export arch_val="$(dpkg --print-architecture)"; \ - if [ "$arch_val" != "ppc64el" ]; then \ - go install -race -tags netgo std; \ - fi; \ - go get -tags netgo \ - github.com/fzipp/gocyclo \ - golang.org/x/lint/golint \ - github.com/kisielk/errcheck \ - github.com/fatih/hclfmt \ - github.com/client9/misspell/cmd/misspell && \ - chmod a+wr --recursive /usr/local/go && \ - rm -rf /go/pkg/ /go/src/ + + +RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.32.2 # Only install shfmt on amd64, as the version v1.3.0 isn't supported for ppc64le # and the later version of shfmt doesn't work with the application well