prometheus/.golangci.yml
Javier Palomo Almena 7ec647dbe9
golangci: Use depguard to prevent using restricted packages (#7825)
Enabling this linter in golangci will check that we are not using
restricted packages, and when a match is found, it will provide a
message suggesting the alternative package.

In this particular case, we enable it for `sync/atomic`.

Signed-off-by: Javier Palomo <javier.palomo.almena@gmail.com>
2020-08-21 11:37:21 +02:00

26 lines
442 B
YAML

run:
modules-download-mode: vendor
deadline: 5m
linters:
enable:
- depguard
- golint
issues:
exclude-rules:
- path: _test.go
linters:
- errcheck
linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages:
- sync/atomic
packages-with-error-message:
- sync/atomic: "Use go.uber.org/atomic instead of sync/atomic"
errcheck:
exclude: scripts/errcheck_excludes.txt