From e0847f5457edfdeb17dad259f1cd06b1d4cec93e Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Thu, 2 Apr 2020 15:58:23 -0700 Subject: V2 podman system service * Added support for system service * Enabled linting on the varlinkapi source, needed to support V2 service command * Added support for PODMAN_SOCKET Skip linting deprecated code Rather than introduce bugs by correcting deprecated code, linting the code is being skipped. Code that is being ported into V2 is being checked. Signed-off-by: Jhon Honce --- hack/golangci-lint.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 hack/golangci-lint.sh (limited to 'hack') diff --git a/hack/golangci-lint.sh b/hack/golangci-lint.sh new file mode 100755 index 000000000..385b21f39 --- /dev/null +++ b/hack/golangci-lint.sh @@ -0,0 +1,15 @@ +#!/bin/bash -e + +# Need to run linter twice to cover all the build tags code paths + +declare -A BUILD_TAGS +BUILD_TAGS[default]="apparmor,seccomp,selinux" +BUILD_TAGS[abi]="${BUILD_TAGS[default]},ABISupport,varlink,!remoteclient" +BUILD_TAGS[tunnel]="${BUILD_TAGS[default]},!ABISupport,!varlink,remoteclient" + +[[ $1 == run ]] && shift + +for i in tunnel abi; do + echo Build Tags: ${BUILD_TAGS[$i]} + golangci-lint run --build-tags=${BUILD_TAGS[$i]} "$@" +done -- cgit v1.2.3-54-g00ecf