summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-04-02 15:58:23 -0700
committerJhon Honce <jhonce@redhat.com>2020-04-07 19:22:10 -0700
commite0847f5457edfdeb17dad259f1cd06b1d4cec93e (patch)
tree157f89a3172892a83b7c8515b0991d806f4c159e /hack
parentb4840ec0d34bd679faefe06ce52ee6cebcb8f0b5 (diff)
downloadpodman-e0847f5457edfdeb17dad259f1cd06b1d4cec93e.tar.gz
podman-e0847f5457edfdeb17dad259f1cd06b1d4cec93e.tar.bz2
podman-e0847f5457edfdeb17dad259f1cd06b1d4cec93e.zip
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 <jhonce@redhat.com>
Diffstat (limited to 'hack')
-rwxr-xr-xhack/golangci-lint.sh15
1 files changed, 15 insertions, 0 deletions
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