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
|
FROM golang:1.16-alpine
|
||||||
RUN apk add --no-cache git yamllint
|
RUN apk add --no-cache gcc musl-dev yamllint
|
||||||
RUN go get -u gopkg.in/alecthomas/gometalinter.v1 \
|
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.36.0
|
||||||
&& mv /go/bin/gometalinter.v1 /go/bin/gometalinter \
|
|
||||||
&& gometalinter --install
|
|
||||||
WORKDIR /go/src/github.com/docker/buildx
|
WORKDIR /go/src/github.com/docker/buildx
|
||||||
RUN --mount=target=/go/src/github.com/docker/buildx \
|
RUN --mount=target=/go/src/github.com/docker/buildx --mount=target=/root/.cache,type=cache \
|
||||||
gometalinter --config=gometalinter.json ./...
|
golangci-lint run
|
||||||
RUN --mount=target=/go/src/github.com/docker/buildx \
|
RUN --mount=target=/go/src/github.com/docker/buildx --mount=target=/root/.cache,type=cache \
|
||||||
yamllint -c .yamllint.yml --strict .
|
yamllint -c .yamllint.yml --strict .
|
Loading…
Reference in New Issue