1
0
mirror of https://github.com/coreos/prometheus-operator.git synced 2026-02-05 15:46:31 +01:00
Files
prometheus-operator/.golangci.yml
dongjiang 83ed01170f Merge pull request #8062 from kubeservice-stack/update-thanos-v0.40.1
chore: Update thanos version to v0.40.1 and golang version to 1.25
2025-11-24 21:35:15 +01:00

70 lines
1.4 KiB
YAML

version: "2"
run:
go: "1.25"
timeout: 10m
modules-download-mode: readonly
allow-parallel-runners: true
linters:
enable:
- depguard
- exptostd
- godot
- godoclint
- iface
- iotamixing
- modernize
- nilnesserr
- recvcheck
- revive
- sloglint
- testifylint
- unconvert
settings:
depguard:
rules:
forbid-pkg-errors:
deny:
- pkg: github.com/pkg/errors
desc: Should be replaced with standard lib errors or fmt.Errorf
- pkg: sort
desc: Should be replaced with slices package
errcheck:
exclude-functions:
# Any error in HTTP handlers is handled by the server itself.
- (net/http.ResponseWriter).Write
modernize:
disable:
- omitzero
exclusions:
generated: strict
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
# Disable errcheck linter for test files.
- linters:
- errcheck
- staticcheck
- testifylint
- revive
path: _test.go
paths:
- zz_generated.*\.go$
- examples$
formatters:
enable:
- gci
settings:
gci:
sections:
- standard
- default
- prefix(github.com/prometheus-operator/prometheus-operator)
exclusions:
generated: strict
paths:
- zz_generated.*\.go$
- examples$