Skip to content

Commit

Permalink
fix depguard config
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Jul 10, 2023
1 parent e31c533 commit 5f87b6f
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,19 @@ linters-settings:
json: snake
yaml: snake
depguard:
list-type: blacklist
include-go-root: true
packages-with-error-message:
- errors: "errors is allowed only by internal/errors"
- k8s.io/apimachinery/pkg/api/errors: "errors is allowed only by internal/errors"
- github.com/cockroachdb/errors: "errors is allowed only by internal/errors"
- github.com/pkg/errors: "errors is allowed only by internal/errors"
- github.com/go-errors/errors: "errors is allowed only by internal/errors"
- golang.org/x/sync/errgroup: "errgroup is allowed only by internal/errgroup"
rules:
main:
deny:
- pkg: "errors"
desc: "errors is allowed only by internal/errors"
- pkg: "k8s.io/apimachinery/pkg/api/errors"
desc: "errors is allowed only by internal/errors"
- pkg: "github.com/cockroachdb/errors"
desc: "errors is allowed only by internal/errors"
- pkg: "github.com/pkg/errors"
desc: "errors is allowed only by internal/errors"
- pkg: github.com/go-errors/errors
desc: "errors is allowed only by internal/errors"
govet:
check-shadowing: true
enable-all: true

0 comments on commit 5f87b6f

Please sign in to comment.