loop/.golangci.yml
Slyghtning fe747a0670
linter: migrate .golangci.yml from v1 to v2
Migrated with `golangci-lint migrate --skip-validation`
2025-08-19 21:57:00 +02:00

131 lines
2.2 KiB
YAML

version: "2"
run:
go: "1.24"
# 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:
gosec:
excludes:
- G402
- G306
- G115
staticcheck:
checks:
- -SA1019
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$