From 58fd190c31eab0c9cc5a347f654718d1f191925a Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Tue, 19 Nov 2024 18:29:04 -0800 Subject: [PATCH] lint: enable importas rules from buildkit Signed-off-by: Tonis Tiigi --- .golangci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 4a0b2c82..b31d72fa 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -34,6 +34,16 @@ linters-settings: - "appendAssign" - "singleCaseSwitch" - "exitAfterDefer" # FIXME + importas: + alias: + # Enforce alias to prevent it accidentally being used instead of + # buildkit errdefs package (or vice-versa). + - pkg: "github.com/containerd/errdefs" + alias: "cerrdefs" + - pkg: "github.com/opencontainers/image-spec/specs-go/v1" + alias: "ocispecs" + - pkg: "github.com/opencontainers/go-digest" + alias: "digest" govet: enable: - nilness