From cb555fa16f9f2e41d6802b8c21cf2e814b987c32 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 1 Sep 2023 13:14:45 +0200 Subject: [PATCH] golangci-lint: enable depguard to prevent re-introducing libcontainer Signed-off-by: Sebastiaan van Stijn --- .golangci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 3b0b619c3..e25569292 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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 @@ -54,6 +55,13 @@ issues: text: "redefines-builtin-id" linters-settings: + depguard: + rules: + main: + deny: + - pkg: github.com/opencontainers/runc + desc: We don't want to depend on runc (libcontainer), unless there is no other option; see https://github.com/opencontainers/runc/issues/3028. + gosec: # The following issues surfaced when `gosec` linter # was enabled. They are temporarily excluded to unblock