plugin-barman-cloud/.golangci.yml
Francesco Canovai 883cb4b65c chore: update golangci-lint config to v2
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
2025-03-27 16:15:29 +01:00

93 lines
1.6 KiB
YAML

version: "2"
linters:
default: none
enable:
- asciicheck
- bodyclose
- copyloopvar
- dogsled
- dupl
- durationcheck
- errcheck
- ginkgolinter
- gocognit
- goconst
- gocritic
- gocyclo
- goheader
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- govet
- importas
- ineffassign
- lll
- makezero
- misspell
- nakedret
- nestif
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- thelper
- tparallel
- unconvert
- unparam
- unused
- wastedassign
- whitespace
settings:
lll:
line-length: 120
exclusions:
generated: lax
rules:
- linters:
- revive
text: should not use dot imports
source: ginkgo|gomega
- linters:
- goconst
path: _test\.go
- linters:
- lll
source: //\s*\+
- linters:
- staticcheck
path: api/
text: 'ST1016:'
paths:
- zz_generated.*
- internal/operator/controller/suite_test.go
- test
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/cloudnative-pg/plugin-barman-cloud)
- blank
- dot
exclusions:
generated: lax
paths:
- zz_generated.*
- internal/operator/controller/suite_test.go
- test
- third_party$
- builtin$
- examples$