2020-03-16 22:53:24 +00:00
|
|
|
# run:
|
|
|
|
# # timeout for analysis, e.g. 30s, 5m, default is 1m
|
|
|
|
# timeout: 5m
|
2019-11-01 15:26:53 +00:00
|
|
|
|
|
|
|
linters:
|
2020-03-16 22:53:24 +00:00
|
|
|
disable-all: true
|
2019-11-01 15:26:53 +00:00
|
|
|
enable:
|
2020-01-07 20:56:49 +00:00
|
|
|
- bodyclose
|
|
|
|
- deadcode
|
|
|
|
- depguard
|
|
|
|
- dogsled
|
|
|
|
- errcheck
|
|
|
|
- goconst
|
2020-03-16 22:53:24 +00:00
|
|
|
- gocritic
|
2019-11-01 15:26:53 +00:00
|
|
|
- gofmt
|
|
|
|
- goimports
|
2020-01-07 20:56:49 +00:00
|
|
|
- golint
|
|
|
|
- gosec
|
|
|
|
- gosimple
|
|
|
|
- govet
|
|
|
|
- ineffassign
|
|
|
|
- interfacer
|
2020-03-16 22:53:24 +00:00
|
|
|
- maligned
|
2020-01-07 20:56:49 +00:00
|
|
|
- misspell
|
2020-03-16 22:53:24 +00:00
|
|
|
- nakedret
|
|
|
|
- prealloc
|
2020-01-07 20:56:49 +00:00
|
|
|
- scopelint
|
|
|
|
- staticcheck
|
|
|
|
- structcheck
|
|
|
|
- stylecheck
|
|
|
|
- typecheck
|
|
|
|
- unconvert
|
2019-11-01 15:26:53 +00:00
|
|
|
- unused
|
2020-03-16 22:53:24 +00:00
|
|
|
- misspell
|
2020-01-07 20:56:49 +00:00
|
|
|
- varcheck
|
2019-11-01 15:26:53 +00:00
|
|
|
|
|
|
|
issues:
|
|
|
|
exclude-rules:
|
2020-03-16 22:53:24 +00:00
|
|
|
- text: "Use of weak random number generator"
|
|
|
|
linters:
|
|
|
|
- gosec
|
2020-01-07 20:56:49 +00:00
|
|
|
- text: "comment on exported var"
|
2019-11-01 15:26:53 +00:00
|
|
|
linters:
|
2020-01-07 20:56:49 +00:00
|
|
|
- golint
|
2020-03-16 22:53:24 +00:00
|
|
|
- text: "don't use an underscore in package name"
|
2019-11-01 15:26:53 +00:00
|
|
|
linters:
|
2020-03-16 22:53:24 +00:00
|
|
|
- golint
|
|
|
|
- text: "ST1003:"
|
|
|
|
linters:
|
|
|
|
- stylecheck
|
|
|
|
# FIXME: Disabled until golangci-lint updates stylecheck with this fix:
|
|
|
|
# https://github.com/dominikh/go-tools/issues/389
|
|
|
|
- text: "ST1016:"
|
|
|
|
linters:
|
|
|
|
- stylecheck
|
|
|
|
|
|
|
|
linters-settings:
|
|
|
|
dogsled:
|
|
|
|
max-blank-identifiers: 3
|
|
|
|
maligned:
|
|
|
|
# print struct with more effective memory layout or not, false by default
|
|
|
|
suggest-new: true
|