diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-21 05:07:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-21 05:07:30 -0400 |
commit | 90636fe8c2d1eb5ae75afa73405c8b12a0417fca (patch) | |
tree | c6e320c49d6d223e4009a3ee5a54793777579c82 /hack/golangci-lint.sh | |
parent | 89276a5f92717c4c6a299ca2be182a3797d9c90d (diff) | |
parent | 09dc701097ac874c3885fa58ed4f143c29ae83f0 (diff) | |
download | podman-90636fe8c2d1eb5ae75afa73405c8b12a0417fca.tar.gz podman-90636fe8c2d1eb5ae75afa73405c8b12a0417fca.tar.bz2 podman-90636fe8c2d1eb5ae75afa73405c8b12a0417fca.zip |
Merge pull request #5863 from vrothberg/v2-fix-rmi
podman rmi: refactor logic
Diffstat (limited to 'hack/golangci-lint.sh')
-rwxr-xr-x | hack/golangci-lint.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/hack/golangci-lint.sh b/hack/golangci-lint.sh index 385b21f39..f4e60d8f5 100755 --- a/hack/golangci-lint.sh +++ b/hack/golangci-lint.sh @@ -3,13 +3,22 @@ # 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]},ABISupport,varlink,!remoteclient" -BUILD_TAGS[tunnel]="${BUILD_TAGS[default]},!ABISupport,!varlink,remoteclient" +BUILD_TAGS[tunnel]="${BUILD_TAGS[default]},!ABISupport,varlink,remoteclient" + +declare -A SKIP_DIRS +SKIP_DIRS[abi]="" +# TODO: add "ABISupport" build tag to pkg/api +SKIP_DIRS[tunnel]="pkg/api" [[ $1 == run ]] && shift for i in tunnel abi; do - echo Build Tags: ${BUILD_TAGS[$i]} - golangci-lint run --build-tags=${BUILD_TAGS[$i]} "$@" + 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 |