1
0
mirror of https://github.com/coreos/prometheus-operator.git synced 2026-02-05 06:45:27 +01:00
Files
prometheus-operator/.golangci.yml
dongjiang fcc78c7e07 change sort to slices package
Signed-off-by: dongjiang <dongjiang1989@126.com>
2025-11-04 16:28:38 +08:00

66 lines
1.4 KiB
YAML

version: "2"
run:
go: "1.24"
timeout: 10m
modules-download-mode: readonly
allow-parallel-runners: true
linters:
enable:
- depguard
- exptostd
- godot
- godoclint
- iface
- iotamixing
- 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
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$