Skip to content

Commit

Permalink
linter: Deny github.com/pkg/errors module usage
Browse files Browse the repository at this point in the history
It is archived and not needed after the standard `error` package release.
Sometimes we (our IDEs) import it by a mistake: 4c1ab5e.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Oct 24, 2023
1 parent eb2b7d0 commit b32e0f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ linters-settings:
govet:
# report about shadowed variables
check-shadowing: false
gomodguard:
blocked:
modules:
- github.com/pkg/errors:
reason: "Obsolete after the 1.13 release; use the standard `errors` package"

linters:
enable:
Expand All @@ -47,6 +52,7 @@ linters:
- exportloopref
- gofmt
- goimports
- gomodguard
- misspell
- predeclared
- reassign
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ require (
github.com/olekukonko/tablewriter v0.0.5
github.com/panjf2000/ants/v2 v2.8.2
github.com/paulmach/orb v0.2.2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.13.0
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.6.1
Expand Down Expand Up @@ -82,6 +81,7 @@ require (
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
Expand Down

0 comments on commit b32e0f1

Please sign in to comment.