Merge pull request #9046 from thaJeztah/depguard_libcontainer

golangci-lint: enable depguard to prevent re-introducing libcontainer
This commit is contained in:
Samuel Karp 2023-11-10 02:27:18 +00:00 committed by GitHub
commit 45d7f2324d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
linters: linters:
enable: 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 - exportloopref # Checks for pointers to enclosing loop variables
- gofmt - gofmt
- goimports - goimports
@ -54,6 +55,13 @@ issues:
text: "redefines-builtin-id" text: "redefines-builtin-id"
linters-settings: 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: gosec:
# The following issues surfaced when `gosec` linter # The following issues surfaced when `gosec` linter
# was enabled. They are temporarily excluded to unblock # was enabled. They are temporarily excluded to unblock