mirror of
https://github.com/coreos/prometheus-operator.git
synced 2026-02-05 15:46:31 +01:00
Enable depguard linter against github.com/pkg/errors (#5930)
* Enable depguard linter against github.com/pkg/errors Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com> * Replace errors in pkg/{admission,alertmanager} Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com> --------- Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
This commit is contained in:
committed by
GitHub
parent
b43f13b2d3
commit
0e3614cf61
@@ -5,6 +5,7 @@ linters:
|
||||
enable:
|
||||
- revive
|
||||
- gci
|
||||
- depguard
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
@@ -24,3 +25,13 @@ linters-settings:
|
||||
- standard
|
||||
- default
|
||||
- prefix(github.com/prometheus-operator/prometheus-operator)
|
||||
depguard:
|
||||
rules:
|
||||
forbid-pkg-errors:
|
||||
files:
|
||||
- "**/admission/*.go"
|
||||
- "**/alertmanager/*.go"
|
||||
- "**/alertmanager/**/*.go"
|
||||
deny:
|
||||
- pkg: "github.com/pkg/errors"
|
||||
dsc: Should be replaced with standard lib errors or fmt.Errorf
|
||||
Reference in New Issue
Block a user