This repository has been archived on 2022-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
dex/vendor/github.com/spf13/pflag/verify/golint.sh
2016-07-26 15:51:24 -07:00

15 lines
314 B
Bash
Executable file

#!/bin/bash
ROOT=$(dirname "${BASH_SOURCE}")/..
GOLINT=${GOLINT:-"golint"}
pushd "${ROOT}" > /dev/null
bad_files=$($GOLINT -min_confidence=0.9 ./...)
if [[ -n "${bad_files}" ]]; then
echo "!!! '$GOLINT' problems: "
echo "${bad_files}"
exit 1
fi
popd > /dev/null
# ex: ts=2 sw=2 et filetype=sh