planetmint-go/.golangci.yaml
Julian Strobl 8db682d994
feat(lint): replace deprecated exportloopref (#467)
with `copyloopvar`, which needs Go 1.22.

* chore(ci): bump go version to v1.22
* fix(ci): pin release pipeline to go v1.22

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
2024-11-12 15:59:09 +01:00

143 lines
2.6 KiB
YAML

---
run:
timeout: 5m
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- copyloopvar
- decorder
- dogsled
- dupl
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- forbidigo
- forcetypeassert
- ginkgolinter
- gocheckcompilerdirectives
- gochecksumtype
- gocognit
- goconst
- gocritic
- gocyclo
- gofmt
- goheader
- gomodguard
- goprintffuncname
- gosimple
- gosmopolitan
- govet
- grouper
- importas
- ineffassign
- interfacebloat
- loggercheck
- makezero
- mirror
- misspell
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- perfsprint
- prealloc
- predeclared
- promlinter
- protogetter
- reassign
- revive
- rowserrcheck
- sloglint
- sqlclosecheck
- staticcheck
- stylecheck
- tagalign
- tagliatelle
- tenv
- testableexamples
- tparallel
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
- zerologlint
linters-settings:
nakedret:
max-func-lines: 100
tagalign:
strict: true
tagliatelle:
case:
use-field-name: true
rules:
json: kebab
issues:
exclude-rules:
- path: x/.*/types/message.*\.go
linters:
- dupl
- path: x/dao/client/cli/tx_reissue_rddl.*\.go
linters:
- dupl
- path: x/dao/client/cli/*\.go
linters:
- revive
- path: testutil/nullify/nullify\.go
linters:
- exhaustive
- path: x/.*/keeper/query.*\.go
linters:
- dupl
- paralleltest
- path: tests/.*/*\.go
linters:
- paralleltest
- path: util/machine_nft_test\.go
linters:
- paralleltest
- path: testutil/network/network.go
linters:
- gocognit
- gocyclo
- wastedassign
- nestif
- path: x/.*/simulation/.*\.go
linters:
- revive
- path: x/.*/module_simulation\.go
linters:
- revive
- path: x/.*/client/cli/query_params\.go
linters:
- revive
- path: x/.*/.*/cli/query_.*\.go
linters:
- revive
- path: docs/docs\.go
linters:
- revive
- path: util/elementsd_connector_test\.go
linters:
- paralleltest
- path: monitor/mqtt_monitor_test\.go
linters:
- paralleltest
- path: monitor/.*\.go
linters:
- durationcheck