make golangci-lint happy

First do not lint pkg/domain/infra/abi with the remote tag as this is
only local code.

Then mark the cacheLibImage field as unused, this should be an unused
stub for the remote client so that we do not leak libimage.
The linter sees that with the remote tag so we need to silence that
warning.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2023-09-13 11:39:05 +02:00
parent c1b6effac5
commit f9aba28ca7
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
3 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,7 @@ BUILD_TAGS[tunnel]="${BUILD_TAGS[default]},remote"
declare -A SKIP_DIRS
SKIP_DIRS[abi]=""
# TODO: add "remote" build tag to pkg/api
SKIP_DIRS[tunnel]="pkg/api"
SKIP_DIRS[tunnel]="pkg/api,pkg/domain/infra/abi"
[[ $1 == run ]] && shift

View File

@ -569,6 +569,8 @@ type SpecGenerator struct {
ContainerResourceConfig
ContainerHealthCheckConfig
//nolint:unused // this is needed for the local client but golangci-lint
// does not seems to happy when we test the remote stub
cacheLibImage
}

View File

@ -5,4 +5,6 @@ package specgen
// Empty stub we do not use any libimage on the remote client,
// this drastically decreases binary size for the remote client.
//
//nolint:unused // this is needed for the local client
type cacheLibImage struct{}