update lint to go1.16/golangci
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>pull/545/head
parent
905be6431b
commit
dba79ba223
@ -0,0 +1,30 @@
|
||||
run:
|
||||
timeout: 10m
|
||||
skip-files:
|
||||
- ".*\\.pb\\.go$"
|
||||
|
||||
modules-download-mode: vendor
|
||||
|
||||
build-tags:
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- gofmt
|
||||
- govet
|
||||
- deadcode
|
||||
- goimports
|
||||
- ineffassign
|
||||
- misspell
|
||||
- unused
|
||||
- varcheck
|
||||
- golint
|
||||
- staticcheck
|
||||
- typecheck
|
||||
- structcheck
|
||||
disable-all: true
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- golint
|
||||
text: "stutters"
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"Vendor": true,
|
||||
"Deadline": "8m",
|
||||
"Exclude": [".*.pb.go"],
|
||||
"DisableAll": true,
|
||||
"Enable": [
|
||||
"gofmt",
|
||||
"goimports",
|
||||
"ineffassign",
|
||||
"vet",
|
||||
"deadcode"
|
||||
]
|
||||
}
|
@ -1,12 +1,10 @@
|
||||
# syntax=docker/dockerfile:1.0-experimental
|
||||
# syntax=docker/dockerfile:1.2
|
||||
|
||||
FROM golang:1.16-alpine
|
||||
RUN apk add --no-cache git yamllint
|
||||
RUN go get -u gopkg.in/alecthomas/gometalinter.v1 \
|
||||
&& mv /go/bin/gometalinter.v1 /go/bin/gometalinter \
|
||||
&& gometalinter --install
|
||||
RUN apk add --no-cache gcc musl-dev yamllint
|
||||
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.36.0
|
||||
WORKDIR /go/src/github.com/docker/buildx
|
||||
RUN --mount=target=/go/src/github.com/docker/buildx \
|
||||
gometalinter --config=gometalinter.json ./...
|
||||
RUN --mount=target=/go/src/github.com/docker/buildx \
|
||||
yamllint -c .yamllint.yml --strict .
|
||||
RUN --mount=target=/go/src/github.com/docker/buildx --mount=target=/root/.cache,type=cache \
|
||||
golangci-lint run
|
||||
RUN --mount=target=/go/src/github.com/docker/buildx --mount=target=/root/.cache,type=cache \
|
||||
yamllint -c .yamllint.yml --strict .
|
Loading…
Reference in New Issue