From 462c1c6d8e9da4b346ecca64e58e45f9da68ee14 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 15 Aug 2024 13:22:59 +0200 Subject: [PATCH] [v5.2] golangci-lint: remove most skip dirs Now that we have propert !remote tags set everywhere we can just rely on that and do not need to skip any dirs. Also on linux do not lint three times, one remote run is enough. We still have to skip the test dir for windows/macos though or we need to add linux build tags there everywhere as well. This seems simpler. Signed-off-by: Paul Holzinger Signed-off-by: tomsweeneyredhat --- hack/golangci-lint.sh | 6 +++--- libpod/events/logfile_test.go | 2 ++ pkg/bindings/test/resource_test.go | 2 ++ test/e2e/run_networking_test.go | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hack/golangci-lint.sh b/hack/golangci-lint.sh index 8803b68bd3..70a371ad86 100755 --- a/hack/golangci-lint.sh +++ b/hack/golangci-lint.sh @@ -18,11 +18,11 @@ BUILD_TAGS_TUNNEL="$BUILD_TAGS_DEFAULT,remote" BUILD_TAGS_REMOTE="remote,containers_image_openpgp" SKIP_DIRS_ABI="" -SKIP_DIRS_TUNNEL="pkg/api,pkg/domain/infra/abi,internal/domain/infra/abi" -SKIP_DIRS_REMOTE="libpod/events,pkg/api,pkg/domain/infra/abi,internal/domain/infra/abi,pkg/machine/qemu,pkg/trust,test" +SKIP_DIRS_TUNNEL="" +SKIP_DIRS_REMOTE="libpod/events,test" declare -a to_lint -to_lint=(ABI TUNNEL REMOTE) +to_lint=(ABI TUNNEL) # Special-case, for Darwin and Windows only "remote" linting is possible and required. if [[ "$GOOS" == "windows" ]] || [[ "$GOOS" == "darwin" ]]; then diff --git a/libpod/events/logfile_test.go b/libpod/events/logfile_test.go index 0fb344177c..f391ef2277 100644 --- a/libpod/events/logfile_test.go +++ b/libpod/events/logfile_test.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package events import ( diff --git a/pkg/bindings/test/resource_test.go b/pkg/bindings/test/resource_test.go index 3a2421c8a3..1afca1d788 100644 --- a/pkg/bindings/test/resource_test.go +++ b/pkg/bindings/test/resource_test.go @@ -1,3 +1,5 @@ +//go:build linux + package bindings_test import ( diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index 813de9f737..010c8f17c6 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -1,3 +1,5 @@ +//go:build linux + package integration import (