loop/.golangci.yml
Boris Nagaev 5d8a5019cf
lint: enable deprecation checks
Enable staticcheck's SA1019 check in golangci-lint so deprecated
identifiers are caught in CI.

Replace deprecated standard library and bbolt APIs with their current
equivalents. Keep intentional compatibility reads and writes of
deprecated Loop RPC fields behind narrow nolint annotations, because
older clients and persisted liquidity parameters still depend on those
fields.
2026-06-22 12:46:12 -05:00

133 lines
2.2 KiB
YAML

version: "2"
run:
go: "1.26"
# timeout for analysis
timeout: 4m
linters:
default: all
disable:
- containedctx
- contextcheck
- cyclop
- depguard
- dogsled
- err113
- errname
- errorlint
- exhaustive
- exhaustruct
- forcetypeassert
- funlen
- gochecknoglobals
- gochecknoinits
- gocognit
- gocyclo
- godox
- gomoddirectives
- inamedparam
- interfacebloat
- intrange
- ireturn
- maintidx
- mnd
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
- paralleltest
- perfsprint
- prealloc
- protogetter
- revive
- tagalign
- testifylint
- testpackage
- thelper
- tparallel
- varnamelen
- wrapcheck
- wsl
- funcorder
- wsl_v5
- noinlineerr
settings:
staticcheck:
checks:
- all
- -QF*
- -ST*
gosec:
excludes:
- G402
- G306
- G115
tagliatelle:
case:
rules:
json: snake
whitespace:
multi-if: true
multi-func: true
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- forbidigo
- gosec
- unparam
path: _test\.go
- linters:
- gosec
path: _mock\.go
- linters:
- errcheck
- forbidigo
path: cmd/loopd/*
- linters:
- forbidigo
path: loopd/*
- linters:
- errcheck
- forbidigo
path: cmd/loop/*
- linters:
- forbidigo
path: fsm/stateparser/*
- linters:
- lll
path: loopd/config.go
- linters:
- lll
path: loopdb/*
paths:
- \.pb\.go$
- \.pb\.gw\.go$
- third_party$
- builtin$
- examples$
issues:
new-from-rev: 36838cf7f464cf73b0201798063b2caffeae4250
formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
simplify: true
exclusions:
generated: lax
paths:
- \.pb\.go$
- \.pb\.gw\.go$
- third_party$
- builtin$
- examples$