Skip to content

Commit

Permalink
golangci-lint: enable depguard for packages that moved
Browse files Browse the repository at this point in the history
Prevent accidental imports of the packages that moved to a separate
module, but that are now an alias.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Jun 19, 2024
1 parent f5ce2f2 commit 136e1b7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
linters:
enable:
- depguard # Checks for imports that shouldn't be used.
- exportloopref # Checks for pointers to enclosing loop variables
- gofmt
- goimports
Expand Down Expand Up @@ -61,6 +62,16 @@ issues:


linters-settings:
depguard:
rules:
main:
deny:
- pkg: "github.com/containerd/containerd/errdefs"
desc: The containerd errdefs package was migrated to a separate module. Use github.com/containerd/errdefs instead.
- pkg: "github.com/containerd/containerd/log"
desc: The containerd log package was migrated to a separate module. Use github.com/containerd/log instead.
- pkg: "github.com/containerd/containerd/platforms"
desc: The containerd log package was migrated to a separate module. Use github.com/containerd/platforms instead.
gosec:
# The following issues surfaced when `gosec` linter
# was enabled. They are temporarily excluded to unblock
Expand Down

0 comments on commit 136e1b7

Please sign in to comment.