plugin-barman-cloud/.golangci.yml
Armando Ruocco 4052756fb8 chore(deps): temporarily use the barman-cloud fork backing #277
Point barman-cloud at the fork branch behind
cloudnative-pg/barman-cloud#277 so this PR builds and CI can run, and
allow the replace directive in the linter configuration. Both changes
must be reverted in favor of an upstream barman-cloud release when
merging.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
2026-07-08 17:12:33 +02:00

102 lines
1.9 KiB
YAML

version: "2"
linters:
default: none
enable:
- asciicheck
- bodyclose
- copyloopvar
- dogsled
- dupl
- durationcheck
- errcheck
- ginkgolinter
- gocognit
- goconst
- gocritic
- gocyclo
- goheader
- gomoddirectives
- gomodguard_v2
- goprintffuncname
- gosec
- govet
- importas
- ineffassign
- lll
- makezero
- misspell
- nakedret
- nestif
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- thelper
- tparallel
- unconvert
- unparam
- unused
- wastedassign
- whitespace
settings:
gomoddirectives:
# Temporary, remove together with the barman-cloud replace in go.mod
# once cloudnative-pg/barman-cloud#277 is merged and released.
replace-allow-list:
- github.com/cloudnative-pg/barman-cloud
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:'
- linters:
- revive
path: internal/cnpgi/common/
text: avoid meaningless package names
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$