Files
skopeo/tests/validate/gometalinter.sh
Daniel J Walsh 9f5e1b3a77 Make lint was complaining about some vetshowed err
We often use err as a variable inside of subblocks, and
we don't want golint to complain about it.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #379
Approved by: nalind
2018-01-03 21:10:28 +00:00

23 lines
783 B
Bash
Executable File

#!/bin/bash
export PATH=${GOPATH%%:*}/bin:${PATH}
if ! which gometalinter.v1 > /dev/null 2> /dev/null ; then
echo gometalinter.v1 is not installed.
echo Try installing it with \"make install.tools\" or with
echo \"go get -u gopkg.in/alecthomas/gometalinter.v1\"
echo \"gometalinter.v1 --install --vendored-linters\"
exit 1
fi
exec gometalinter.v1 \
--enable-gc \
--exclude='error return value not checked.*(Close|Log|Print).*\(errcheck\)$' \
--exclude='.*_test\.go:.*error return value not checked.*\(errcheck\)$' \
--exclude='declaration of.*err.*shadows declaration.*\(vetshadow\)$'\
--exclude='duplicate of.*_test.go.*\(dupl\)$' \
--exclude='vendor\/.*' \
--disable=gotype \
--disable=gas \
--disable=aligncheck \
--cyclo-over=40 \
--deadline=480s \
--tests "$@"