Merge pull request #10368 from thaJeztah/1.6_add_depguard

[release/1.6] golangci-lint: enable depguard for packages that moved
This commit is contained in:
Derek McGowan authored and GitHub committed 2024-06-20 07:03:30 -07:00
commit a5f3ebb6dc
1 file changed
+12
+12
View File
@@ -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
@@ -48,6 +49,17 @@ issues:
text: "redefines-builtin-id"
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.
# TODO: enable once 1.6 migrated to github.com/containerd/platforms
# - pkg: "github.com/containerd/containerd/platforms"
# desc: The containerd platforms 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