Skip to content

Commit 0bb59c4

Browse files
Remove now obsolete gometalinter and use golangci-lint instead with almost the same configuration.
Signed-off-by: Silvin Lubecki <[email protected]>
1 parent 06908e0 commit 0bb59c4

3 files changed

Lines changed: 44 additions & 54 deletions

File tree

.golangci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
run:
2+
deadline: 3m
3+
skip-dirs:
4+
- cli/command/stack/kubernetes/api/openapi
5+
- cli/command/stack/kubernetes/api/client
6+
skip-files:
7+
- cli/compose/schema/bindata.go
8+
- .*generated.*
9+
- parameter .* always receives
10+
linters:
11+
disable-all: true
12+
enable:
13+
- deadcode
14+
- gocyclo
15+
- gofmt
16+
- goimports
17+
- golint
18+
- gosimple
19+
- ineffassign
20+
- interfacer
21+
- lll
22+
- misspell
23+
- nakedret
24+
- unconvert
25+
- unparam
26+
- unused
27+
- vet
28+
linters-settings:
29+
nakedret:
30+
command: nakedret
31+
pattern: ^(?P<path>.*?\\.go):(?P<line>\\d+)\\s*(?P<message>.*)$
32+
gocyclo:
33+
min-complexity: 16
34+
lll:
35+
line-length: 200

dockerfiles/Dockerfile.lint

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
FROM golang:1.12.1-alpine
1+
FROM golang:1.12.1 as build
2+
ARG GOLANGCI_LINTER_SHA=v1.16.0
23

3-
RUN apk add -U git
4+
ENV CGO_ENABLED=0
5+
RUN GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@$GOLANGCI_LINTER_SHA
46

5-
ARG GOMETALINTER_SHA=v2.0.6
6-
RUN go get -d github.com/alecthomas/gometalinter && \
7-
cd /go/src/github.com/alecthomas/gometalinter && \
8-
git checkout -q "$GOMETALINTER_SHA" && \
9-
go build -v -o /usr/local/bin/gometalinter . && \
10-
gometalinter --install && \
11-
rm -rf /go/src/* /go/pkg/*
7+
FROM golang:1.12.1-alpine as lint
128

9+
COPY --from=build /go/bin/golangci-lint /usr/local/bin
1310
WORKDIR /go/src/github.com/docker/cli
14-
ENV CGO_ENABLED=0
1511
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
16-
ENTRYPOINT ["/usr/local/bin/gometalinter"]
17-
CMD ["--config=gometalinter.json", "./..."]
12+
ENV CGO_ENABLED=0
13+
ENTRYPOINT ["/usr/local/bin/golangci-lint"]
14+
CMD ["--verbose", "run", "--config=.golangci.yml"]
1815
COPY . .

gometalinter.json

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)