mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
update linter list
This commit is contained in:
parent
15900477fb
commit
64ad2f9eb1
1 changed files with 56 additions and 8 deletions
|
|
@ -12,27 +12,63 @@ run:
|
||||||
- .*_gen.go
|
- .*_gen.go
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
disable-all: true
|
|
||||||
enable:
|
enable:
|
||||||
- deadcode
|
|
||||||
- goconst
|
- goconst
|
||||||
- goimports
|
- goimports
|
||||||
- gosimple
|
|
||||||
- govet
|
|
||||||
- ineffassign
|
|
||||||
- misspell
|
- misspell
|
||||||
# - staticcheck
|
|
||||||
- unconvert
|
- unconvert
|
||||||
# - unused
|
- bodyclose
|
||||||
- varcheck
|
- containedctx
|
||||||
|
- contextcheck
|
||||||
|
- decorder
|
||||||
|
- durationcheck
|
||||||
|
- errchkjson
|
||||||
|
- errname
|
||||||
|
- errorlint
|
||||||
|
- exhaustive
|
||||||
|
- exportloopref
|
||||||
|
- gocognit
|
||||||
|
- gofmt
|
||||||
|
- gomnd
|
||||||
|
- gomoddirectives
|
||||||
|
- gosec
|
||||||
|
- makezero
|
||||||
|
- nestif
|
||||||
|
- nilerr
|
||||||
|
- nilnil
|
||||||
|
- noctx
|
||||||
|
#- nosprintfhostport # TODO: do we use IPv6?
|
||||||
|
- paralleltest
|
||||||
|
- prealloc
|
||||||
|
- predeclared
|
||||||
|
#- promlinter
|
||||||
|
#- revive
|
||||||
|
- tagliatelle
|
||||||
|
- tenv
|
||||||
|
- thelper
|
||||||
|
- tparallel
|
||||||
|
- unconvert
|
||||||
|
- unparam
|
||||||
|
- wsl
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
gofmt:
|
gofmt:
|
||||||
simplify: true
|
simplify: true
|
||||||
auto-fix: false
|
auto-fix: false
|
||||||
|
|
||||||
goconst:
|
goconst:
|
||||||
min-len: 3 # minimum length of string constant
|
min-len: 3 # minimum length of string constant
|
||||||
min-occurrences: 2 # minimum number of occurrences
|
min-occurrences: 2 # minimum number of occurrences
|
||||||
|
numbers: true
|
||||||
|
|
||||||
|
goimports:
|
||||||
|
local-prefixes: github.com/ethereum/go-ethereum
|
||||||
|
|
||||||
|
nestif:
|
||||||
|
min-complexity: 3
|
||||||
|
|
||||||
|
prealloc:
|
||||||
|
for-loops: true
|
||||||
|
|
||||||
gocritic:
|
gocritic:
|
||||||
# Which checks should be enabled; can't be combined with 'disabled-checks';
|
# Which checks should be enabled; can't be combined with 'disabled-checks';
|
||||||
|
|
@ -93,6 +129,18 @@ linters-settings:
|
||||||
- fieldalignment
|
- fieldalignment
|
||||||
- shadow
|
- shadow
|
||||||
- unsafeptr
|
- unsafeptr
|
||||||
|
check-shadowing: true
|
||||||
|
enable-all: true
|
||||||
|
settings:
|
||||||
|
printf:
|
||||||
|
# Run `go tool vet help printf` to see available settings for `printf` analyzer.
|
||||||
|
funcs:
|
||||||
|
- (github.com/ethereum/go-ethereum/log.Logger).Trace
|
||||||
|
- (github.com/ethereum/go-ethereum/log.Logger).Debug
|
||||||
|
- (github.com/ethereum/go-ethereum/log.Logger).Info
|
||||||
|
- (github.com/ethereum/go-ethereum/log.Logger).Warn
|
||||||
|
- (github.com/ethereum/go-ethereum/log.Logger).Error
|
||||||
|
- (github.com/ethereum/go-ethereum/log.Logger).Crit
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue