109 lines
2.0 KiB
YAML
109 lines
2.0 KiB
YAML
run:
|
|
timeout: 5m
|
|
tests: true
|
|
|
|
linters:
|
|
enable:
|
|
# Default linters (recommended in golangci-lint)
|
|
- gofmt
|
|
- govet
|
|
- errcheck
|
|
- staticcheck
|
|
- unused
|
|
- gosimple
|
|
- structcheck
|
|
- varcheck
|
|
- ineffassign
|
|
- deadcode
|
|
|
|
# Additional linters for comprehensive auditing
|
|
- gosec
|
|
- gocyclo
|
|
- dupl
|
|
- goconst
|
|
- gocritic
|
|
- gosimple
|
|
- typecheck
|
|
- asciicheck
|
|
- bodyclose
|
|
- dogsled
|
|
- exportloopref
|
|
- funlen
|
|
- gochecknoglobals
|
|
- gochecknoinits
|
|
- gocognit
|
|
- goerr113
|
|
- goimports
|
|
- golint
|
|
- gomnd
|
|
- goprintffuncname
|
|
- nakedret
|
|
- nestif
|
|
- nlreturn
|
|
- noctx
|
|
- rowserrcheck
|
|
- sqlclosecheck
|
|
- stylecheck
|
|
- unconvert
|
|
- unparam
|
|
- whitespace
|
|
- gofumpt
|
|
- gci
|
|
- godot
|
|
- godox
|
|
- goerr113
|
|
- testifylint
|
|
|
|
linters-settings:
|
|
gocyclo:
|
|
min-complexity: 15
|
|
dupl:
|
|
threshold: 100
|
|
goconst:
|
|
min-len: 2
|
|
min-occurrences: 3
|
|
gocognit:
|
|
min-complexity: 20
|
|
golint:
|
|
min-confidence: 0.8
|
|
funlen:
|
|
lines: 100
|
|
statements: 50
|
|
gci:
|
|
sections:
|
|
- standard
|
|
- default
|
|
- prefix(github.com/fraktal/mev-beta)
|
|
gomnd:
|
|
settings:
|
|
mnd:
|
|
# don't include the "operation" and "assign"
|
|
checks: [argument, case, condition, return]
|
|
gofumpt:
|
|
module-path: github.com/fraktal/mev-beta
|
|
extra-rules: true
|
|
godox:
|
|
keywords:
|
|
- BUG
|
|
- FIXME
|
|
- HACK
|
|
testifylint:
|
|
enable-all: true
|
|
|
|
issues:
|
|
exclude-use-default: false
|
|
exclude:
|
|
- "Error return value of .((io.)?|bytes.)?Read(|Full|At) is not checked"
|
|
- "Error return value of .(fmt.)?F(scan|print|printf|println) is not checked"
|
|
- "SA1019: package github.com/ethereum/go-ethereum/common/math is deprecated"
|
|
exclude-rules:
|
|
# Exclude some linters from running on test files
|
|
- path: _test\.go
|
|
linters:
|
|
- gocyclo
|
|
- errcheck
|
|
- dupl
|
|
- gosec
|
|
- funlen
|
|
- gocognit
|
|
- gomnd |