Files
podman/hack/golangci-lint.sh
Daniel J Walsh 9263ed2ab1 Remove use of ABISupport buildtag
We need to default to building podman. If you specify no build
tags you will not build podman, not podman-remote.

Just using remote flag to indicate podman-remote and !remote for
podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-03 15:11:34 -04:00

25 lines
711 B
Bash
Executable File

#!/bin/bash -e
# Need to run linter twice to cover all the build tags code paths
declare -A BUILD_TAGS
# TODO: add systemd tag
BUILD_TAGS[default]="apparmor,seccomp,selinux"
BUILD_TAGS[abi]="${BUILD_TAGS[default]},varlink,!remoteclient"
BUILD_TAGS[tunnel]="${BUILD_TAGS[default]},remote,varlink,remoteclient"
declare -A SKIP_DIRS
SKIP_DIRS[abi]=""
# TODO: add "remote" build tag to pkg/api
SKIP_DIRS[tunnel]="pkg/api"
[[ $1 == run ]] && shift
for i in tunnel abi; do
echo ""
echo Running golangci-lint for "$i"
echo Build Tags "$i": ${BUILD_TAGS[$i]}
echo Skipped directories "$i": ${SKIP_DIRS[$i]}
golangci-lint run --build-tags=${BUILD_TAGS[$i]} --skip-dirs=${SKIP_DIRS[$i]} "$@"
done