Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
golangci-lint: enable depguard to prevent re-introducing libcontainer
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah committed Sep 1, 2023

Verified

This commit was signed with the committer’s verified signature.
thaJeztah Sebastiaan van Stijn
1 parent 5d31e93 commit d28c3ea
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
linters:
enable:
- depguard # Checks for dependencies that should not be (re)introduced. See "linter-settings" for further details.
- exportloopref # Checks for pointers to enclosing loop variables
- gofmt
- goimports
@@ -52,6 +53,17 @@ issues:
text: "redefines-builtin-id"

linters-settings:
depguard:
rules:
main:
allow:
# TODO(thaJeztah): remove this once we updated CDI with https://github.com/cncf-tags/container-device-interface/pull/158 included
- github.com/opencontainers/runc/libcontainer/devices
- github.com/opencontainers/runc/libcontainer/user
deny:
- pkg: github.com/opencontainers/runc
desc: We don't want to introduce more dependencies on runc (libcontainer), unless there is no other option.

gosec:
# The following issues surfaced when `gosec` linter
# was enabled. They are temporarily excluded to unblock

0 comments on commit d28c3ea

Please sign in to comment.