2019-07-01 20:26:59 +00:00
|
|
|
linters:
|
|
|
|
disable-all: true
|
|
|
|
enable:
|
2020-02-18 12:19:04 +00:00
|
|
|
- gofmt
|
|
|
|
- govet
|
2019-07-05 11:21:54 +00:00
|
|
|
- goimports
|
2019-07-01 20:26:59 +00:00
|
|
|
- misspell
|
|
|
|
- goconst
|
|
|
|
- golint
|
|
|
|
- errcheck
|
2019-07-02 13:25:00 +00:00
|
|
|
- gosec
|
2019-07-01 20:26:59 +00:00
|
|
|
- unconvert
|
|
|
|
- staticcheck
|
|
|
|
- varcheck
|
|
|
|
- structcheck
|
|
|
|
- deadcode
|
2019-07-05 11:21:54 +00:00
|
|
|
- scopelint
|
2019-07-01 20:26:59 +00:00
|
|
|
|
2021-03-26 00:17:46 +00:00
|
|
|
# We don't want to skip builtin/
|
|
|
|
skip-dirs-use-default: false
|
|
|
|
skip-dirs:
|
|
|
|
- vendor$
|
|
|
|
- testdata$
|
|
|
|
- examples$
|
2019-07-02 13:25:00 +00:00
|
|
|
|
2019-07-01 20:26:59 +00:00
|
|
|
issues:
|
2019-07-02 13:25:00 +00:00
|
|
|
exclude:
|
|
|
|
- "func name will be used as test\\.Test.* by other packages, and that stutters; consider calling this"
|
2019-07-03 16:59:49 +00:00
|
|
|
- "Potential file inclusion via variable"
|
2019-07-11 08:00:24 +00:00
|
|
|
- "should have( a package)? comment"
|
2020-05-27 20:53:20 +00:00
|
|
|
- "Error return value of `logging.SetLogLevel` is not checked"
|
2020-08-20 04:49:10 +00:00
|
|
|
- "comment on exported"
|
|
|
|
- "(func|method) \\w+ should be \\w+"
|
|
|
|
- "(type|var|struct field|(method|func) parameter) `\\w+` should be `\\w+`"
|
|
|
|
- "(G306|G301|G307|G108|G302|G204|G104)"
|
|
|
|
- "don't use ALL_CAPS in Go names"
|
|
|
|
- "string .* has .* occurrences, make it a constant"
|
|
|
|
- "a blank import should be only in a main or test package, or have a comment justifying it"
|
|
|
|
- "package comment should be of the form"
|
2019-07-02 13:25:00 +00:00
|
|
|
|
2019-07-01 20:26:59 +00:00
|
|
|
exclude-use-default: false
|
2019-07-02 13:25:00 +00:00
|
|
|
exclude-rules:
|
2020-05-27 20:53:20 +00:00
|
|
|
- path: lotuspond
|
|
|
|
linters:
|
|
|
|
- errcheck
|
|
|
|
|
2019-07-02 13:25:00 +00:00
|
|
|
- path: node/modules/lp2p
|
|
|
|
linters:
|
|
|
|
- golint
|
2020-05-27 20:53:20 +00:00
|
|
|
|
|
|
|
- path: build/params_.*\.go
|
|
|
|
linters:
|
|
|
|
- golint
|
2020-06-02 14:29:39 +00:00
|
|
|
|
|
|
|
- path: api/apistruct/struct.go
|
|
|
|
linters:
|
|
|
|
- golint
|
2020-05-27 20:53:20 +00:00
|
|
|
|
|
|
|
- path: .*_test.go
|
2019-07-08 15:14:36 +00:00
|
|
|
linters:
|
|
|
|
- gosec
|
2019-07-01 20:26:59 +00:00
|
|
|
|
2020-08-20 04:49:10 +00:00
|
|
|
- path: chain/vectors/gen/.*
|
|
|
|
linters:
|
|
|
|
- gosec
|
|
|
|
|
|
|
|
- path: cmd/lotus-bench/.*
|
|
|
|
linters:
|
|
|
|
- gosec
|
|
|
|
|
|
|
|
- path: api/test/.*
|
|
|
|
text: "context.Context should be the first parameter"
|
|
|
|
linters:
|
|
|
|
- golint
|
|
|
|
|
2019-07-01 20:26:59 +00:00
|
|
|
linters-settings:
|
|
|
|
goconst:
|
|
|
|
min-occurrences: 6
|