2019-11-18 11:49:18 +03:00
# This file configures github.com/golangci/golangci-lint.
run :
2022-01-31 15:17:18 +03:00
timeout : 20m
2019-11-18 11:49:18 +03:00
tests : true
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default : true
2020-01-16 15:09:38 +03:00
skip-files :
- core/genesis_alloc.go
2019-11-18 11:49:18 +03:00
2023-02-02 14:36:37 +03:00
output :
format : colored-line-number
2019-11-18 11:49:18 +03:00
linters :
disable-all : true
enable :
- goimports
- gosimple
- govet
- ineffassign
- misspell
- unconvert
2022-06-13 17:24:45 +03:00
- typecheck
- unused
- staticcheck
- bidichk
- durationcheck
- exportloopref
2022-07-25 13:14:03 +03:00
- whitespace
2022-06-13 17:24:45 +03:00
2022-07-25 13:14:03 +03:00
# - structcheck # lots of false positives
# - errcheck #lot of false positives
# - contextcheck
# - errchkjson # lots of false positives
# - errorlint # this check crashes
# - exhaustive # silly check
# - makezero # false positives
# - nilerr # several intentional
2019-11-18 11:49:18 +03:00
linters-settings :
gofmt :
simplify : true
issues :
exclude-rules :
2023-09-08 11:36:16 +03:00
- path : core/state/metrics.go
2019-11-18 11:49:18 +03:00
linters :
2023-09-08 11:36:16 +03:00
- unused
- path : core/txpool/legacypool/list.go
2019-11-18 11:49:18 +03:00
linters :
2022-06-13 17:24:45 +03:00
- staticcheck
- path : internal/build/pgp.go
2022-09-10 14:25:40 +03:00
text: 'SA1019 : "golang.org/x/crypto/openpgp" is deprecated : this package is unmaintained except for security fixes.'
2022-06-13 17:24:45 +03:00
- path : core/vm/contracts.go
2022-09-10 14:25:40 +03:00
text: 'SA1019 : "golang.org/x/crypto/ripemd160" is deprecated : RIPEMD-160 is a legacy hash and should not be used for new applications.'
2022-06-13 17:24:45 +03:00
- path : accounts/usbwallet/trezor.go
2022-09-10 14:25:40 +03:00
text: 'SA1019 : "github.com/golang/protobuf/proto" is deprecated : Use the "google.golang.org/protobuf/proto" package instead.'
2022-06-13 17:24:45 +03:00
- path : accounts/usbwallet/trezor/
2022-09-10 14:25:40 +03:00
text: 'SA1019 : "github.com/golang/protobuf/proto" is deprecated : Use the "google.golang.org/protobuf/proto" package instead.'
2022-06-13 17:24:45 +03:00
exclude :
- 'SA1019: event.TypeMux is deprecated : use Feed'
- 'SA1019 : strings.Title is deprecated'
2022-06-29 21:49:04 +03:00
- 'SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0 : The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.'
2022-06-13 17:24:45 +03:00
- 'SA1029 : should not use built-in type string as key for value'