2019-11-18 08:49:18 +00:00
# This file configures github.com/golangci/golangci-lint.
run :
2022-01-31 12:17:18 +00:00
timeout : 20m
2019-11-18 08:49:18 +00: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 12:09:38 +00:00
skip-files :
- core/genesis_alloc.go
2019-11-18 08:49:18 +00:00
linters :
disable-all : true
enable :
- deadcode
- goconst
- goimports
- gosimple
- govet
- ineffassign
- misspell
- unconvert
- varcheck
2022-06-13 14:24:45 +00:00
- typecheck
- unused
- staticcheck
- bidichk
- durationcheck
- exportloopref
- gosec
2022-07-25 10:14:03 +00:00
- whitespace
2022-06-13 14:24:45 +00:00
2022-07-25 10:14:03 +00: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 08:49:18 +00:00
linters-settings :
gofmt :
simplify : true
goconst :
min-len : 3 # minimum length of string constant
min-occurrences : 6 # minimum number of occurrences
2022-06-13 14:24:45 +00:00
gosec :
excludes :
2022-07-25 10:14:03 +00:00
- G404 # Use of weak random number generator - lots of FP
- G107 # Potential http request -- those are intentional
- G306 # G306 : Expect WriteFile permissions to be 0600 or less
2019-11-18 08:49:18 +00:00
issues :
exclude-rules :
2022-06-13 14:24:45 +00:00
- path : crypto/bn256/cloudflare/optate.go
2020-01-16 12:09:38 +00:00
linters :
- deadcode
2022-06-13 14:24:45 +00:00
- staticcheck
- path : internal/build/pgp.go
text: 'SA1019 : package golang.org/x/crypto/openpgp is deprecated'
- path : core/vm/contracts.go
text: 'SA1019 : package golang.org/x/crypto/ripemd160 is deprecated'
- path : accounts/usbwallet/trezor.go
text: 'SA1019 : package github.com/golang/protobuf/proto is deprecated'
- path : accounts/usbwallet/trezor/
text: 'SA1019 : package github.com/golang/protobuf/proto is deprecated'
exclude :
- 'SA1019: event.TypeMux is deprecated : use Feed'
- 'SA1019 : strings.Title is deprecated'
2022-06-29 18:49:04 +00: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 14:24:45 +00:00
- 'SA1029 : should not use built-in type string as key for value'
2022-06-29 18:49:04 +00:00
- 'G306 : Expect WriteFile permissions to be 0600 or less'