Removing gometalinter in favor of golangci-lint
This commit is contained in:
parent
eacd102fe4
commit
091eb670b2
|
@ -0,0 +1,45 @@
|
|||
[run]
|
||||
concurrency = 4
|
||||
tests = false
|
||||
|
||||
[linters-settings]
|
||||
[linters-settings.gocyclo]
|
||||
min-complexity = 20
|
||||
|
||||
[linters-settings.goconst]
|
||||
min-len = 2
|
||||
min-occurrences = 2
|
||||
|
||||
[linters-settings.misspell]
|
||||
locale = "US"
|
||||
|
||||
[linters]
|
||||
# White-listing, to be more CI safe.
|
||||
disable-all = true
|
||||
|
||||
# @see https://github.com/golangci/golangci-lint#enabled-by-default-linters
|
||||
enable = [
|
||||
"staticcheck",
|
||||
"gosimple",
|
||||
"ineffassign",
|
||||
"typecheck",
|
||||
"govet",
|
||||
# "errcheck",
|
||||
"unused",
|
||||
"structcheck",
|
||||
"varcheck",
|
||||
"deadcode",
|
||||
|
||||
"stylecheck",
|
||||
"gosec",
|
||||
"interfacer",
|
||||
"unconvert",
|
||||
# "goconst",
|
||||
"gocyclo",
|
||||
# "maligned",
|
||||
"depguard",
|
||||
"misspell",
|
||||
"unparam",
|
||||
"scopelint", # Would like to ignore *_test.go files, but can't atm.
|
||||
"gocritic",
|
||||
]
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
"Cyclo": 10,
|
||||
"Deadline": "5m",
|
||||
"Vendor": true,
|
||||
"Test": true,
|
||||
"EnableAll": false,
|
||||
"Checkstyle": false,
|
||||
"Errors": false,
|
||||
"Enable": [
|
||||
"deadcode",
|
||||
"dupl",
|
||||
"errcheck",
|
||||
"gochecknoglobals",
|
||||
"gochecknoinits",
|
||||
"goconst",
|
||||
"gofmt",
|
||||
"gotypex",
|
||||
"goimports",
|
||||
"golint",
|
||||
"gosec",
|
||||
"ineffassign",
|
||||
"interfacer",
|
||||
"staticcheck",
|
||||
"misspell",
|
||||
"nakedret",
|
||||
"test",
|
||||
"testify",
|
||||
"unconvert",
|
||||
"unparam",
|
||||
"vetshadow",
|
||||
"staticcheck"
|
||||
],
|
||||
"Disable": [
|
||||
"gochecknoglobals",
|
||||
"gochecknoinits",
|
||||
"dupl"
|
||||
],
|
||||
"Exclude": [
|
||||
"vendor/.*",
|
||||
"by package bimg",
|
||||
"Errors unhandled",
|
||||
"Potential file inclusion via variable",
|
||||
"should have comment"
|
||||
]
|
||||
}
|
|
@ -33,9 +33,10 @@ RUN DEBIAN_FRONTEND=noninteractive \
|
|||
ldconfig && \
|
||||
GO111MODULE=off go get -u github.com/golang/dep/cmd/dep
|
||||
|
||||
# Installing gometalinter
|
||||
# Installing golangci-lint
|
||||
WORKDIR /tmp
|
||||
RUN curl -fsSL https://git.io/vp6lP -o instgm.sh && chmod u+x instgm.sh && ./instgm.sh -b "${GOPATH}/bin"
|
||||
RUN curl -fsSL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v1.16.0
|
||||
|
||||
|
||||
WORKDIR ${GOPATH}/src/github.com/h2non/imaginary
|
||||
|
||||
|
@ -47,7 +48,7 @@ RUN rm -rf vendor && dep ensure
|
|||
|
||||
# Run quality control
|
||||
RUN GO111MODULE=off go test -test.v -test.race -test.covermode=atomic ./...
|
||||
RUN GO111MODULE=off gometalinter github.com/h2non/imaginary
|
||||
RUN GO111MODULE=off golangci-lint run ./...
|
||||
|
||||
# Compile imaginary
|
||||
RUN GO111MODULE=off go build -a \
|
||||
|
|
Loading…
Reference in New Issue